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

This commit is contained in:
Adrian Greeve 2012-05-18 16:39:53 +08:00 committed by Eloy Lafuente (stronk7)
parent af75421c54
commit 0a498686c0
2 changed files with 3 additions and 3 deletions

View File

@ -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 File

@ -541,7 +541,7 @@ if ($showactivity) {
$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 @@ if ($showactivity) {
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