diff options
author | Steve Beaver <sbeaver@netgate.com> | 2017-02-10 07:51:44 -0500 |
---|---|---|
committer | Steve Beaver <sbeaver@netgate.com> | 2017-02-10 07:52:12 -0500 |
commit | 59d06739e3b2f5668ce2cb5c06efb0e5d96ec534 (patch) | |
tree | 0fbb741127d4896f2cee5e4449e137b470b95d1d /src/usr/local/www/system_authservers.php | |
parent | fb169a1c5cb304a75ba61e6bfde674b53c902fdb (diff) | |
download | pfsense-59d06739e3b2f5668ce2cb5c06efb0e5d96ec534.zip pfsense-59d06739e3b2f5668ce2cb5c06efb0e5d96ec534.tar.gz |
GET/POST conversion system_authservers.php
Diffstat (limited to 'src/usr/local/www/system_authservers.php')
-rw-r--r-- | src/usr/local/www/system_authservers.php | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/src/usr/local/www/system_authservers.php b/src/usr/local/www/system_authservers.php index 7d9e186..11e061a 100644 --- a/src/usr/local/www/system_authservers.php +++ b/src/usr/local/www/system_authservers.php @@ -96,19 +96,14 @@ if ($_REQUEST['ajax']) { exit; } -if (is_numericint($_GET['id'])) { - $id = $_GET['id']; -} - -if (isset($_POST['id']) && is_numericint($_POST['id'])) { - $id = $_POST['id']; -} +$id = $_POST['id']; if (!is_array($config['system']['authserver'])) { $config['system']['authserver'] = array(); } $a_servers = auth_get_authserver_list(); + foreach ($a_servers as $servers) { $a_server[] = $servers; } @@ -116,22 +111,20 @@ foreach ($a_servers as $servers) { if (!is_array($config['ca'])) { $config['ca'] = array(); } + $a_ca =& $config['ca']; -$act = $_GET['act']; -if ($_POST['act']) { - $act = $_POST['act']; -} +$act = $_POST['act']; if ($act == "del") { - if (!$a_server[$_GET['id']]) { + if (!$a_server[$_POST['id']]) { pfSenseHeader("system_authservers.php"); exit; } /* Remove server from main list. */ - $serverdeleted = $a_server[$_GET['id']]['name']; + $serverdeleted = $a_server[$_POST['id']]['name']; foreach ($config['system']['authserver'] as $k => $as) { if ($config['system']['authserver'][$k]['name'] == $serverdeleted) { unset($config['system']['authserver'][$k]); @@ -139,7 +132,7 @@ if ($act == "del") { } /* Remove server from temp list used later on this page. */ - unset($a_server[$_GET['id']]); + unset($a_server[$_POST['id']]); $savemsg = sprintf(gettext("Authentication Server %s deleted."), htmlspecialchars($serverdeleted)); write_config($savemsg); @@ -216,7 +209,7 @@ if ($act == "new") { $pconfig['radius_acct_port'] = "1813"; } -if ($_POST) { +if ($_POST['save']) { unset($input_errors); $pconfig = $_POST; @@ -453,8 +446,8 @@ if (!($act == "new" || $act == "edit" || $input_errors)) { <td><?=htmlspecialchars($server['host'])?></td> <td> <?php if ($i < (count($a_server) - 1)): ?> - <a class="fa fa-pencil" title="<?=gettext("Edit server"); ?>" href="system_authservers.php?act=edit&id=<?=$i?>"></a> - <a class="fa fa-trash" title="<?=gettext("Delete server")?>" href="system_authservers.php?act=del&id=<?=$i?>"></a> + <a class="fa fa-pencil" title="<?=gettext("Edit server"); ?>" href="system_authservers.php?act=edit&id=<?=$i?>" usepost></a> + <a class="fa fa-trash" title="<?=gettext("Delete server")?>" href="system_authservers.php?act=del&id=<?=$i?>" usepost></a> <?php endif?> </td> </tr> @@ -466,7 +459,7 @@ if (!($act == "new" || $act == "edit" || $input_errors)) { </div> <nav class="action-buttons"> - <a href="?act=new" class="btn btn-success btn-sm"> + <a href="?act=new" class="btn btn-success btn-sm" usepost> <i class="fa fa-plus icon-embed-btn"></i> <?=gettext("Add")?> </a> |