diff options
author | Steve Beaver <sbeaver@netgate.com> | 2017-02-10 11:40:30 -0500 |
---|---|---|
committer | Steve Beaver <sbeaver@netgate.com> | 2017-02-10 11:40:30 -0500 |
commit | f34455d8fc6337ffac01c4d0bdf880e7d9c99910 (patch) | |
tree | 2e66826ac4d29cbd81cce9a8a0ba29f75fd9271f /src/usr/local/www | |
parent | 41063bd734a9d0a37667433f5939d6052916a3ce (diff) | |
download | pfsense-f34455d8fc6337ffac01c4d0bdf880e7d9c99910.zip pfsense-f34455d8fc6337ffac01c4d0bdf880e7d9c99910.tar.gz |
GET/POST conversion interfaces_ppps*
Diffstat (limited to 'src/usr/local/www')
-rw-r--r-- | src/usr/local/www/interfaces_ppps.php | 18 | ||||
-rw-r--r-- | src/usr/local/www/interfaces_ppps_edit.php | 2 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/usr/local/www/interfaces_ppps.php b/src/usr/local/www/interfaces_ppps.php index 19afc48..9aa074e 100644 --- a/src/usr/local/www/interfaces_ppps.php +++ b/src/usr/local/www/interfaces_ppps.php @@ -50,15 +50,15 @@ function ppp_inuse($num) { return false; } -if ($_GET['act'] == "del") { +if ($_POST['act'] == "del") { /* check if still in use */ - if (ppp_inuse($_GET['id'])) { + if (ppp_inuse($_POST['id'])) { $input_errors[] = gettext("This point-to-point link cannot be deleted because it is still being used as an interface."); - } elseif (is_array($config['ppps']['ppp']) && is_array($config['ppps']['ppp'][$_GET['id']])) { + } elseif (is_array($config['ppps']['ppp']) && is_array($config['ppps']['ppp'][$_POST['id']])) { - unset($config['ppps']['ppp'][$_GET['id']]['pppoe-reset-type']); - handle_pppoe_reset($config['ppps']['ppp'][$_GET['id']]); - unset($config['ppps']['ppp'][$_GET['id']]); + unset($config['ppps']['ppp'][$_POST['id']]['pppoe-reset-type']); + handle_pppoe_reset($config['ppps']['ppp'][$_POST['id']]); + unset($config['ppps']['ppp'][$_POST['id']]); write_config(); header("Location: interfaces_ppps.php"); exit; @@ -126,8 +126,8 @@ foreach ($a_ppps as $id => $ppp) { <?=htmlspecialchars($ppp['descr'])?> </td> <td> - <a class="fa fa-pencil" title="<?=gettext('Edit PPP interface')?>" href="interfaces_ppps_edit.php?id=<?=$i?>"></a> - <a class="fa fa-trash" title="<?=gettext('Delete PPP interface')?>" href="interfaces_ppps.php?act=del&id=<?=$i?>"></a> + <a class="fa fa-pencil" title="<?=gettext('Edit PPP interface')?>" href="interfaces_ppps_edit.php?id=<?=$i?>" usepost></a> + <a class="fa fa-trash" title="<?=gettext('Delete PPP interface')?>" href="interfaces_ppps.php?act=del&id=<?=$i?>" usepost></a> </td> </tr> <?php @@ -141,7 +141,7 @@ foreach ($a_ppps as $id => $ppp) { </div> <nav class="action-buttons"> - <a href="interfaces_ppps_edit.php" class="btn btn-success btn-sm"> + <a href="interfaces_ppps_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_ppps_edit.php b/src/usr/local/www/interfaces_ppps_edit.php index 14a7481..9057d53 100644 --- a/src/usr/local/www/interfaces_ppps_edit.php +++ b/src/usr/local/www/interfaces_ppps_edit.php @@ -179,7 +179,7 @@ if (isset($id) && $a_ppps[$id]) { $pconfig['ptpid'] = interfaces_ptpid_next(); } -if (isset($_POST) && is_array($_POST) && count($_POST) > 0) { +if (isset($_POST['save']) && is_array($_POST) && count($_POST) > 0) { unset($input_errors); $pconfig = $_POST; |