]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-14463 search/order - make it cross-db + delete unused column from query ; merged...
authorstronk7 <stronk7>
Wed, 6 May 2009 17:25:26 +0000 (17:25 +0000)
committerstronk7 <stronk7>
Wed, 6 May 2009 17:25:26 +0000 (17:25 +0000)
mod/data/view.php

index 3be4028d1095ba4990fe91bceeb8ae88f09d1c70..82767689aec56fd360b1abd154206c6da3b980f4 100755 (executable)
             $sortcontent = $sortfield->get_sort_field();
             $sortcontentfull = $sortfield->get_sort_sql('c.'.$sortcontent);
 
-            $what = ' DISTINCT r.id, r.approved, r.timecreated, r.timemodified, r.userid, u.firstname, u.lastname, c.'.$sortcontent.', '.$sortcontentfull.' AS _order ';
+            $what = ' DISTINCT r.id, r.approved, r.timecreated, r.timemodified, r.userid, u.firstname, u.lastname, '.$DB->sql_compare_text($sortcontentfull).' AS _order ';
             $count = ' COUNT(DISTINCT c.recordid) ';
             $tables = '{data_content} c, {data_records} r, {data_content} cs, {user} u ';
             $where =  'WHERE c.recordid = r.id