summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/diag_authentication.php
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-11-15 17:34:18 +0545
committerPhil Davis <phil.davis@inf.org>2015-11-15 17:34:18 +0545
commit79e14f1ccb09b264901a0a82032a224d086ea0f6 (patch)
tree1e12a5bb14b3f41660ce0b6072adbccc5003e2dc /src/usr/local/www/diag_authentication.php
parent8e81f6a88180c5c9a280d78fd77788f7160b0d1a (diff)
downloadpfsense-79e14f1ccb09b264901a0a82032a224d086ea0f6.zip
pfsense-79e14f1ccb09b264901a0a82032a224d086ea0f6.tar.gz
Improve diag_authentication.php redmine #5440
Move the code to select the default auth server so that it only happens the first time into the page. Now if the user selects a different auth server to test, and presses test, the results come back and the selected auth server is re-displayed (rather than the system default auth server being re-chosen every time). Do not use address-of "&" when referring to the $config value - we do not ever intend to modify the config in here, so there seems no point in risking it by using a pointer.
Diffstat (limited to 'src/usr/local/www/diag_authentication.php')
-rw-r--r--src/usr/local/www/diag_authentication.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/usr/local/www/diag_authentication.php b/src/usr/local/www/diag_authentication.php
index 85fd3bb..4e53a56 100644
--- a/src/usr/local/www/diag_authentication.php
+++ b/src/usr/local/www/diag_authentication.php
@@ -96,7 +96,14 @@ if ($_POST) {
$input_errors[] = gettext("Authentication failed.");
}
}
+} else {
+ if (isset($config['system']['webgui']['authmode'])) {
+ $pconfig['authmode'] = $config['system']['webgui']['authmode'];
+ } else {
+ $pconfig['authmode'] = "Local Database";
+ }
}
+
$pgtitle = array(gettext("Diagnostics"), gettext("Authentication"));
$shortcut_section = "authentication";
include("head.inc");
@@ -118,12 +125,6 @@ $section = new Form_Section('Authentication Test');
foreach (auth_get_authserver_list() as $auth_server)
$serverlist[$auth_server['name']] = $auth_server['name'];
-if (isset($config['system']['webgui']['authmode'])) {
- $pconfig['authmode'] = &$config['system']['webgui']['authmode'];
-}
-else {
- $pconfig['authmode'] = "Local Database";
-}
$section->addInput(new Form_Select(
'authmode',
'Authentication Server',
OpenPOWER on IntegriCloud