summaryrefslogtreecommitdiffstats
path: root/src/usr/local
diff options
context:
space:
mode:
authorSteve Beaver <sbeaver@netgate.com>2017-02-10 11:18:10 -0500
committerSteve Beaver <sbeaver@netgate.com>2017-02-10 11:18:28 -0500
commitb591908c21b476a395a402ae26210bd43ba21d40 (patch)
tree312ea9d9dba2497318590b0ec73e9354d6250f59 /src/usr/local
parente2d1352e399e02b070a1242b05b223cb2952d540 (diff)
downloadpfsense-b591908c21b476a395a402ae26210bd43ba21d40.zip
pfsense-b591908c21b476a395a402ae26210bd43ba21d40.tar.gz
GET/POST conversion interfaces_gif*
Diffstat (limited to 'src/usr/local')
-rw-r--r--src/usr/local/www/interfaces_gif.php18
-rw-r--r--src/usr/local/www/interfaces_gif_edit.php9
2 files changed, 11 insertions, 16 deletions
diff --git a/src/usr/local/www/interfaces_gif.php b/src/usr/local/www/interfaces_gif.php
index b0581ec..f7a568b 100644
--- a/src/usr/local/www/interfaces_gif.php
+++ b/src/usr/local/www/interfaces_gif.php
@@ -47,17 +47,17 @@ function gif_inuse($num) {
return false;
}
-if ($_GET['act'] == "del") {
- if (!isset($_GET['id'])) {
+if ($_POST['act'] == "del") {
+ if (!isset($_POST['id'])) {
$input_errors[] = gettext("Wrong parameters supplied");
- } else if (empty($a_gifs[$_GET['id']])) {
+ } else if (empty($a_gifs[$_POST['id']])) {
$input_errors[] = gettext("Wrong index supplied");
/* check if still in use */
- } else if (gif_inuse($_GET['id'])) {
+ } else if (gif_inuse($_POST['id'])) {
$input_errors[] = gettext("This gif TUNNEL cannot be deleted because it is still being used as an interface.");
} else {
- pfSense_interface_destroy($a_gifs[$_GET['id']]['gifif']);
- unset($a_gifs[$_GET['id']]);
+ pfSense_interface_destroy($a_gifs[$_POST['id']]['gifif']);
+ unset($a_gifs[$_POST['id']]);
write_config();
@@ -113,8 +113,8 @@ display_top_tabs($tab_array);
<?=htmlspecialchars($gif['descr'])?>
</td>
<td>
- <a class="fa fa-pencil" title="<?=gettext('Edit GIF interface')?>" href="interfaces_gif_edit.php?id=<?=$i?>"></a>
- <a class="fa fa-trash" title="<?=gettext('Delete GIF interface')?>" href="interfaces_gif.php?act=del&amp;id=<?=$i?>"></a>
+ <a class="fa fa-pencil" title="<?=gettext('Edit GIF interface')?>" href="interfaces_gif_edit.php?id=<?=$i?>" usepost></a>
+ <a class="fa fa-trash" title="<?=gettext('Delete GIF interface')?>" href="interfaces_gif.php?act=del&amp;id=<?=$i?>" usepost></a>
</td>
</tr>
<?php endforeach; ?>
@@ -125,7 +125,7 @@ display_top_tabs($tab_array);
</div>
<nav class="action-buttons">
- <a href="interfaces_gif_edit.php" class="btn btn-success btn-sm">
+ <a href="interfaces_gif_edit.php" class="btn btn-success btn-sm" usepost>
<i class="fa fa-plus icon-embed-btn"></i>
<?=gettext("Add")?>
</a>
diff --git a/src/usr/local/www/interfaces_gif_edit.php b/src/usr/local/www/interfaces_gif_edit.php
index 630a058..8df4465 100644
--- a/src/usr/local/www/interfaces_gif_edit.php
+++ b/src/usr/local/www/interfaces_gif_edit.php
@@ -33,13 +33,8 @@ if (!is_array($config['gifs']['gif'])) {
}
$a_gifs = &$config['gifs']['gif'];
+$id = $_POST['id'];
-if (is_numericint($_GET['id'])) {
- $id = $_GET['id'];
-}
-if (isset($_POST['id']) && is_numericint($_POST['id'])) {
- $id = $_POST['id'];
-}
if (isset($id) && $a_gifs[$id]) {
$pconfig['if'] = $a_gifs[$id]['if'];
@@ -56,7 +51,7 @@ if (isset($id) && $a_gifs[$id]) {
$pconfig['descr'] = $a_gifs[$id]['descr'];
}
-if ($_POST) {
+if ($_POST['save']) {
unset($input_errors);
$pconfig = $_POST;
OpenPOWER on IntegriCloud