MDL-23934 customlang: MySQL does not like SELECT field, *
authorDavid Mudrak <david.mudrak@gmail.com>
Wed, 25 Aug 2010 11:52:49 +0000 (11:52 +0000)
committerDavid Mudrak <david.mudrak@gmail.com>
Wed, 25 Aug 2010 11:52:49 +0000 (11:52 +0000)
admin/report/customlang/locallib.php

index c856980..21a2a03 100644 (file)
@@ -111,7 +111,11 @@ class report_customlang_utils {
         $stringman  = get_string_manager();
         $components = $DB->get_records('customlang_components');
         foreach ($components as $component) {
-            $current = $DB->get_records('customlang', array('lang'=>$lang, 'componentid'=>$component->id), 'stringid', 'stringid, *');
+            $sql = "SELECT stringid, s.*
+                      FROM {customlang} s
+                     WHERE lang = ? AND componentid = ?
+                  ORDER BY stringid";
+            $current = $DB->get_records_sql($sql, array($lang, $component->id));
             $english = $stringman->load_component_strings($component->name, 'en', true, true);
             if ($lang == 'en') {
                 $master =& $english;