Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit 0a498686c02a905c3925b90875bf79931cb920f8 1 parent af75421
@abgreeve abgreeve authored stronk7 committed
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
@@ -3548,7 +3548,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
@@ -541,7 +541,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
@@ -551,7 +551,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
Please sign in to comment.
Something went wrong with that request. Please try again.