"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/db/upgrade.php" between
moodle-3.6.5.tgz and moodle-3.6.6.tgz

About: moodle is a learning management system for producing Internet-based course Web sites. Latest 3.6 release.

upgrade.php  (moodle-3.6.5.tgz):upgrade.php  (moodle-3.6.6.tgz)
skipping to change at line 3080 skipping to change at line 3080
$chunks = array_chunk($records, 1000); $chunks = array_chunk($records, 1000);
foreach ($chunks as $chunk) { foreach ($chunks as $chunk) {
list($insql, $inparams) = $DB->get_in_or_equal($chunk); list($insql, $inparams) = $DB->get_in_or_equal($chunk);
$DB->delete_records_select('favourite', "id $insql", $inparams); $DB->delete_records_select('favourite', "id $insql", $inparams);
} }
} }
upgrade_main_savepoint(true, 2018120303.16); upgrade_main_savepoint(true, 2018120303.16);
} }
if ($oldversion < 2018120305.04) {
// Update the empty tag instructions to null.
$instructions = get_config('core', 'auth_instructions');
if (trim(html_to_text($instructions)) === '') {
set_config('auth_instructions', '');
}
// Main savepoint reached.
upgrade_main_savepoint(true, 2018120305.04);
}
if ($oldversion < 2018120305.13) {
// Delete "orphaned" subscriptions.
$sql = "SELECT DISTINCT es.userid
FROM {event_subscriptions} es
LEFT JOIN {user} u ON u.id = es.userid
WHERE u.deleted = 1 OR u.id IS NULL";
$deletedusers = $DB->get_field_sql($sql);
if ($deletedusers) {
list($sql, $params) = $DB->get_in_or_equal($deletedusers);
// Delete orphaned subscriptions.
$DB->execute("DELETE FROM {event_subscriptions} WHERE userid " . $sq
l, $params);
}
upgrade_main_savepoint(true, 2018120305.13);
}
return true; return true;
} }
 End of changes. 1 change blocks. 
0 lines changed or deleted 30 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)