MDL-18227 forum ratings - clean wrong records; merged from 19_STABLE

This commit is contained in:
stronk7 2009-05-04 08:44:51 +00:00
parent 3265eb1ab3
commit 9b66b300c6
2 changed files with 10 additions and 1 deletions

View File

@ -255,6 +255,15 @@ function xmldb_forum_upgrade($oldversion) {
upgrade_mod_savepoint($result, 2009042700, 'forum');
}
if ($result && $oldversion < 2009050400) {
/// Clean existing wrong rates. MDL-18227
$DB->delete_records('forum_ratings', array('post' => 0));
/// forum savepoint reached
upgrade_mod_savepoint($result, 2009050400, 'forum');
}
return $result;
}

View File

@ -5,7 +5,7 @@
// This fragment is called by /admin/index.php
////////////////////////////////////////////////////////////////////////////////
$module->version = 2009042700;
$module->version = 2009050400;
$module->requires = 2009041700; // Requires this Moodle version
$module->cron = 60;