# This patch file was generated by NetBeans IDE
# This patch can be applied using context Tools: Apply Diff Patch action on respective folder.
# It uses platform neutral UTF-8 encoding.
# Above lines and this line are ignored by the patching process.
Index: moodle/admin/settings/users.php
--- moodle/admin/settings/users.php Base (1.26.2.16)
+++ moodle/admin/settings/users.php Locally Modified (Based On 1.26.2.16)
@@ -41,10 +41,7 @@
         $authbyname = array();
 
         foreach ($auths as $auth) {
-            $strauthname = get_string("auth_{$auth}title", "auth");
-            if ($strauthname == "[[auth_{$auth}title]]") {
-                $strauthname = get_string("auth_{$auth}title", "auth_{$auth}");
-            }
+            $strauthname = auth_get_plugin_title($auth);
             $authbyname[$strauthname] = $auth;
         }
         ksort($authbyname);
Index: moodle/admin/uploaduser.php
--- moodle/admin/uploaduser.php Base (1.68.2.14)
+++ moodle/admin/uploaduser.php Locally Modified (Based On 1.68.2.14)
@@ -961,7 +961,7 @@
     $plugins = get_enabled_auth_plugins();
     $choices = array();
     foreach ($plugins as $plugin) {
-        $choices[$plugin] = get_string('auth_'.$plugin.'title', 'auth');
\ No newline at end of file
+        $choices[$plugin] = auth_get_plugin_title ($plugin);
\ No newline at end of file
     }
 
     return $choices;
Index: moodle/lib/authlib.php
--- moodle/lib/authlib.php Base (1.8.2.6)
+++ moodle/lib/authlib.php Locally Modified (Based On 1.8.2.6)
@@ -347,12 +347,8 @@
      * Return the properly translated human-friendly title of this auth plugin
      */
     function get_title() {
-        $authtitle = get_string("auth_{$this->authtype}title", "auth");
-        if ($authtitle == "[[auth_{$this->authtype}title]]") {
-            $authtitle = get_string("auth_{$this->authtype}title", "auth_{$this->authtype}");
+        return get_auth_plugin_title($this->authtype);
         }
-        return $authtitle;
-    }
 
     /**
      *  Get the auth description (from core or own auth lang files)
Index: moodle/lib/weblib.php
--- moodle/lib/weblib.php Base (1.970.2.136)
+++ moodle/lib/weblib.php Locally Modified (Based On 1.970.2.136)
@@ -7081,6 +7081,18 @@
     return ($inpopup);
 }
 
+/**
+ * Return the authentication plugin title
+ * @param string $authtype plugin type
+ * @return string
+ */
+function auth_get_plugin_title ($authtype) {
+    $authtitle = get_string("auth_{$authtype}title", "auth");
+    if ($authtitle == "[[auth_{$authtype}title]]") {
+        $authtitle = get_string("auth_{$authtype}title", "auth_{$authtype}");
+    }
+    return $authtitle;
+}
 
 // vim:autoindent:expandtab:shiftwidth=4:tabstop=4:tw=140:
 ?>
Index: moodle/user/editadvanced_form.php
--- moodle/user/editadvanced_form.php Base (1.14.2.11)
+++ moodle/user/editadvanced_form.php Locally Modified (Based On 1.14.2.11)
@@ -28,7 +28,7 @@
         $modules = get_list_of_plugins('auth');
         $auth_options = array();
         foreach ($modules as $module) {
-            $auth_options[$module] = get_string("auth_$module"."title", "auth");
+            $auth_options[$module] = auth_get_plugin_title ($module);
         }
         $mform->addElement('select', 'auth', get_string('chooseauthmethod','auth'), $auth_options);
         $mform->setHelpButton('auth', array('authchange', get_string('chooseauthmethod','auth')));
Index: moodle/user/filters/lib.php
--- moodle/user/filters/lib.php Base (1.1.2.4)
+++ moodle/user/filters/lib.php Locally Modified (Based On 1.1.2.4)
@@ -118,7 +118,7 @@
                 $plugins = get_list_of_plugins('auth');
                 $choices = array();
                 foreach ($plugins as $auth) {
-                    $choices[$auth] = get_string("auth_{$auth}title", 'auth');
+                    $choices[$auth] = auth_get_plugin_title ($auth);
                 }
                 return new user_filter_simpleselect('auth', get_string('authentication'), $advanced, 'auth', $choices);
 
