Browse files

MDL-32126 replaced _order with sortorder to make sorting work in oracle

  • Loading branch information...
1 parent f654ae9 commit d02908d323383498f3cc3ee7ef0181674ac88edc @abgreeve abgreeve committed with stronk7 May 18, 2012
Showing with 3 additions and 3 deletions.
  1. +1 −1 mod/data/lib.php
  2. +2 −2 mod/data/view.php
View
2 mod/data/lib.php
@@ -3609,7 +3609,7 @@ function data_get_advanced_search_sql($sort, $data, $recordids, $selectdata, $so
}
$nestselectsql = 'SELECT r.id, r.approved, r.timecreated, r.timemodified, r.userid, u.firstname, u.lastname, ' . $sortcontentfull . '
- AS _order
+ AS sortorder
FROM {data_content} c,
{data_records} r,
{user} u ';
View
4 mod/data/view.php
@@ -542,7 +542,7 @@
$sortcontent = $DB->sql_compare_text('c.' . $sortfield->get_sort_field());
$sortcontentfull = $sortfield->get_sort_sql($sortcontent);
- $what = ' DISTINCT r.id, r.approved, r.timecreated, r.timemodified, r.userid, u.firstname, u.lastname, ' . $sortcontentfull . ' AS _order ';
+ $what = ' DISTINCT r.id, r.approved, r.timecreated, r.timemodified, r.userid, u.firstname, u.lastname, ' . $sortcontentfull . ' AS sortorder ';
$count = ' COUNT(DISTINCT c.recordid) ';
$tables = '{data_content} c, {data_records} r, {data_content} cs, {user} u ';
$where = 'WHERE c.recordid = r.id
@@ -552,7 +552,7 @@
AND cs.recordid = r.id ';
$params['dataid'] = $data->id;
$params['sort'] = $sort;
- $sortorder = ' ORDER BY _order '.$order.' , r.id ASC ';
+ $sortorder = ' ORDER BY sortorder '.$order.' , r.id ASC ';
$searchselect = '';
// If requiredentries is not reached, only show current user's entries

0 comments on commit d02908d

Please sign in to comment.