MDL-26117 skip invalid resource records during upgrade

This commit is contained in:
Petr Skoda
2011-01-26 13:24:33 +01:00
parent 8cdc85ac62
commit ae36bc3dd8
+5 -1
View File
@@ -53,7 +53,11 @@ function resource_20_migrate() {
$siteid = get_site()->id;
$fs = get_file_storage();
if (strpos($path, 'LOCALPATH') === 0) {
if (empty($candidate->cmid)) {
// skip borked records
continue;
} else if (strpos($path, 'LOCALPATH') === 0) {
// ignore not maintained local files - sorry
continue;