mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 01:46:45 +02:00
Merge branch 'MDL-66327-master' of git://github.com/andrewnicols/moodle
This commit is contained in:
commit
ee8f44db8c
1 changed files with 12 additions and 18 deletions
|
@ -843,7 +843,6 @@ class pgsql_native_moodle_database extends moodle_database {
|
||||||
* @throws dml_exception A DML specific exception is thrown for any errors.
|
* @throws dml_exception A DML specific exception is thrown for any errors.
|
||||||
*/
|
*/
|
||||||
public function get_records_sql($sql, array $params = null, $limitfrom = 0, $limitnum = 0) {
|
public function get_records_sql($sql, array $params = null, $limitfrom = 0, $limitnum = 0) {
|
||||||
|
|
||||||
list($limitfrom, $limitnum) = $this->normalise_limit_from_num($limitfrom, $limitnum);
|
list($limitfrom, $limitnum) = $this->normalise_limit_from_num($limitfrom, $limitnum);
|
||||||
|
|
||||||
if ($limitnum) {
|
if ($limitnum) {
|
||||||
|
@ -868,12 +867,8 @@ class pgsql_native_moodle_database extends moodle_database {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$rows = pg_fetch_all($result);
|
$return = [];
|
||||||
pg_free_result($result);
|
while ($row = pg_fetch_assoc($result)) {
|
||||||
|
|
||||||
$return = array();
|
|
||||||
if ($rows) {
|
|
||||||
foreach ($rows as $row) {
|
|
||||||
$id = reset($row);
|
$id = reset($row);
|
||||||
if ($blobs) {
|
if ($blobs) {
|
||||||
foreach ($blobs as $blob) {
|
foreach ($blobs as $blob) {
|
||||||
|
@ -886,7 +881,6 @@ class pgsql_native_moodle_database extends moodle_database {
|
||||||
}
|
}
|
||||||
$return[$id] = (object) $row;
|
$return[$id] = (object) $row;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue