From: stronk7 Date: Sat, 4 Aug 2007 17:18:14 +0000 (+0000) Subject: Support some strings from within the auth plugin lang files added. MDL-10694 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=d660c423fda11341c136490dca0bf07b927ee6cd;p=moodle.git Support some strings from within the auth plugin lang files added. MDL-10694 Merged from MOODLE_18_STABLE --- diff --git a/admin/auth.php b/admin/auth.php index 8b0c25cf76..fabfa5e69d 100644 --- a/admin/auth.php +++ b/admin/auth.php @@ -139,9 +139,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; } } @@ -150,9 +156,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 a75f4ed20f..a9cb8fd18a 100644 --- a/admin/auth_config.php +++ b/admin/auth_config.php @@ -51,11 +51,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(); @@ -68,9 +73,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 "
\n"; $authplugin->config_form($frm, $err, $user_fields);