MDL-61028 core_search: Fix SELECT bug affecting Oracle

This commit is contained in:
sam marshall 2018-04-24 12:08:35 +01:00 committed by David Monllao
parent ac8f106b4d
commit acaeb5ec41

View File

@ -261,7 +261,7 @@ class core_user {
if (!in_array('deleted', $extra)) {
$extrafieldlist[] = 'deleted';
}
$extrafields = \user_picture::fields('u',
$selectfields = \user_picture::fields('u',
array_merge(get_all_user_name_fields(), $extrafieldlist));
$index = 1;
@ -327,7 +327,7 @@ class core_user {
$readcount = $max + 2;
for ($i = 0; $i < $querylimit; $i++) {
$rawresult = $DB->get_records_sql("
SELECT users.*, $extrafields
SELECT $selectfields
FROM ($userquery) users
JOIN {user} u ON u.id = users.id
WHERE $where