mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-15132 fixed broken sql menu functions - thanks Howard
This commit is contained in:
parent
4c14345543
commit
ce7fbdb8de
@ -692,8 +692,9 @@ abstract class moodle_database {
|
||||
$menu = array();
|
||||
if ($records = $this->get_records_select($table, $select, $params, $sort, $fields, $limitfrom, $limitnum)) {
|
||||
foreach ($records as $record) {
|
||||
$key = array_unshift($record);
|
||||
$value = array_unshift($record);
|
||||
$record = (array)$record;
|
||||
$key = array_shift($record);
|
||||
$value = array_shift($record);
|
||||
$menu[$key] = $value;
|
||||
}
|
||||
}
|
||||
@ -716,8 +717,9 @@ abstract class moodle_database {
|
||||
$menu = array();
|
||||
if ($records = $this->get_records_sql($sql, $params, $limitfrom, $limitnum)) {
|
||||
foreach ($records as $record) {
|
||||
$key = array_unshift($record);
|
||||
$value = array_unshift($record);
|
||||
$record = (array)$record;
|
||||
$key = array_shift($record);
|
||||
$value = array_shift($record);
|
||||
$menu[$key] = $value;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user