diff --git a/admin/auth.php b/admin/auth.php index d6ab820a1ac..d3ac7d3af06 100644 --- a/admin/auth.php +++ b/admin/auth.php @@ -140,9 +140,15 @@ $registrationauths = array(); $registrationauths[''] = $txt->disable; foreach ($authsenabled as $auth) { $authplugin = get_auth_plugin($auth); - $displayauths[$auth] = get_string("auth_{$auth}title", 'auth'); +/// Get the auth title (from core or own auth lang files) + $authtitle = get_string("auth_{$auth}title", "auth"); + if ($authtitle == "[[auth_{$auth}title]]") { + $authtitle = get_string("auth_{$auth}title", "auth_{$auth}"); + } +/// Apply titles + $displayauths[$auth] = $authtitle; if ($authplugin->can_signup()) { - $registrationauths[$auth] = get_string("auth_{$auth}title", 'auth'); + $registrationauths[$auth] = $authtitle; } } @@ -151,9 +157,15 @@ foreach ($authsavailable as $auth) { continue; //already in the list } $authplugin = get_auth_plugin($auth); - $displayauths[$auth] = get_string("auth_{$auth}title", 'auth'); +/// Get the auth title (from core or own auth lang files) + $authtitle = get_string("auth_{$auth}title", "auth"); + if ($authtitle == "[[auth_{$auth}title]]") { + $authtitle = get_string("auth_{$auth}title", "auth_{$auth}"); + } +/// Apply titles + $displayauths[$auth] = $authtitle; if ($authplugin->can_signup()) { - $registrationauths[$auth] = get_string("auth_{$auth}title", 'auth'); + $registrationauths[$auth] = $authtitle; } } diff --git a/admin/auth_config.php b/admin/auth_config.php index 7a65ba4ea05..59f1d4506b3 100644 --- a/admin/auth_config.php +++ b/admin/auth_config.php @@ -52,11 +52,16 @@ if ($frm = data_submitted()) { $user_fields = array("firstname", "lastname", "email", "phone1", "phone2", "department", "address", "city", "country", "description", "idnumber", "lang"); -$modules = get_list_of_plugins('auth'); -foreach ($modules as $module) { - $options[$module] = get_string("auth_{$module}title", 'auth'); -} -asort($options); +/// Get the auth title (from core or own auth lang files) + $authtitle = get_string("auth_{$auth}title", "auth"); + if ($authtitle == "[[auth_{$auth}title]]") { + $authtitle = get_string("auth_{$auth}title", "auth_{$auth}"); + } +/// Get the auth descriptions (from core or own auth lang files) + $authdescription = get_string("auth_{$auth}description", "auth"); + if ($authdescription == "[[auth_{$auth}description]]") { + $authdescription = get_string("auth_{$auth}description", "auth_{$auth}"); + } // output configuration form admin_externalpage_print_header($adminroot); @@ -69,9 +74,9 @@ echo "\n"; // auth plugin description print_simple_box_start('center', '80%'); -print_heading($options[$auth]); -print_simple_box_start('center', '60%', '', 5, 'informationbox'); -print_string("auth_{$auth}description", 'auth'); +print_heading($authtitle); +print_simple_box_start('center', '80%', '', 5, 'informationbox'); +echo $authdescription; print_simple_box_end(); echo "