wiki MDL-24862 fixed wiki upgrade error (tested for mssql and mysql)

This commit is contained in:
Aparup Banerjee 2010-11-19 08:36:49 +00:00
parent 05d7a48dc5
commit 70b082fa6d

View File

@ -143,9 +143,8 @@ function wiki_get_current_version($pageid) {
$sql = "SELECT *
FROM {wiki_versions}
WHERE pageid = ?
ORDER BY version DESC
LIMIT 1";
return $DB->get_record_sql($sql, array($pageid));
ORDER BY version DESC";
return array_pop($DB->get_records_sql($sql, array($pageid), 0, 1));
}