From 08d6f8ff2a381716492aa8fe0c34c1d593d15f8c Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Sun, 15 Nov 2015 17:20:04 +0545 Subject: Backport Redmine #5440 to RELENG_2_2 The code in RELENG_2_2 for system_usermanager_settings.php seems to work OK in RELENG_2_2 so I did not touch anything there. But diag_authentication.php had nothing about $pconfig on initial page load. This extra code makes it select a reasonable default auth server when the page first loads. After that, each time the user does "Test", the page comes back with the previously selected auth server, user name and password (like it did already) - so that seems good. --- usr/local/www/diag_authentication.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'usr') diff --git a/usr/local/www/diag_authentication.php b/usr/local/www/diag_authentication.php index 24d567e..a4c9290 100644 --- a/usr/local/www/diag_authentication.php +++ b/usr/local/www/diag_authentication.php @@ -66,6 +66,14 @@ if ($_POST) { $input_errors[] = gettext("Authentication failed."); } } +} else { + // Choose a reasonable initial default. + 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"; -- cgit v1.1