MDL-22050 removing moodle/langconfig duplicates
authorPetr Skoda <skodak@moodle.org>
Sat, 10 Apr 2010 17:30:00 +0000 (17:30 +0000)
committerPetr Skoda <skodak@moodle.org>
Sat, 10 Apr 2010 17:30:00 +0000 (17:30 +0000)
AMOS BEGIN
  MOV [alphabet,core],[alphabet,core_langconfig]
AMOS END

admin/user.php
lang/en/moodle.php
lib/moodlelib.php
lib/tablelib.php
user/index.php

index e1fc188..707b572 100644 (file)
         echo $OUTPUT->heading("$usercount ".get_string('users'));
     }
 
-    $alphabet = explode(',', get_string('alphabet'));
+    $alphabet = explode(',', get_string('alphabet', 'langconfig'));
     $strall = get_string('all');
 
     $baseurl = new moodle_url('user.php', array('sort' => $sort, 'dir' => $dir, 'perpage' => $perpage));
index 1f997c5..0496944 100644 (file)
@@ -133,7 +133,6 @@ $string['allownone'] = 'Allow none';
 $string['allownot'] = 'Do not allow';
 $string['allparticipants'] = 'All participants';
 $string['allteachers'] = 'All teachers';
-$string['alphabet'] = 'A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z';
 $string['alphanumerical'] = 'Can only contain alphanumeric characters, hyphen (-) or  period (.)';
 $string['alreadyconfirmed'] = 'Registration has already been confirmed';
 $string['always'] = 'Always';
index 3ce76b9..e90e5d0 100644 (file)
@@ -5856,9 +5856,6 @@ class amos_string_manager implements string_manager {
      * @return string The String !
      */
     public function get_string($identifier, $component='', $a=NULL) {
-        if (empty($component)) {
-            $component = 'moodle';
-        }
         // this will be replaced by merging of lang and langconfig
         static $langconfigstrs = array('alphabet' => 1, 'backupnameformat' => 1, 'decsep' => 1,
                 'firstdayofweek' => 1, 'listsep' => 1, 'locale' => 1, 'localewin' => 1,
@@ -5870,10 +5867,14 @@ class amos_string_manager implements string_manager {
                 'thischarset' => 1, 'thisdirection' => 1, 'thislanguage' => 1,
                 'strftimedatetimeshort' => 1, 'thousandssep' => 1);
 
-        if ((empty($component) or $component === 'moodle') and isset($langconfigstrs[$identifier])) {
+        if ((empty($component)) and isset($langconfigstrs[$identifier])) {
             $component = 'core_langconfig';
         }
 
+        if (empty($component)) {
+            $component = 'moodle';
+        }
+
         $lang = current_language();
 
         $string = $this->load_component_strings($component, $lang);
index 3aed635..ba9f4e2 100644 (file)
@@ -849,7 +849,7 @@ class flexible_table {
                     && isset($this->columns['fullname'])) {
 
             $strall = get_string('all');
-            $alpha  = explode(',', get_string('alphabet'));
+            $alpha  = explode(',', get_string('alphabet', 'langconfig'));
 
             // Bar of first initials
 
index 7880072..488eac1 100644 (file)
                 $firstinitial = $table->get_initial_first();
                 $lastinitial  = $table->get_initial_last();
                 $strall = get_string('all');
-                $alpha  = explode(',', get_string('alphabet'));
+                $alpha  = explode(',', get_string('alphabet', 'langconfig'));
 
                 // Bar of first initials