Permalink
Browse files

MDL-32851 resource: skip resources with invalid files

  • Loading branch information...
1 parent 4dbc9b7 commit d27076d09e221c6eca0664b967996d6aa0ff3346 @mackensen mackensen committed with Sam Hemelryk May 29, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 mod/resource/db/upgradelib.php
View
2 mod/resource/db/upgradelib.php
@@ -138,6 +138,8 @@ function resource_20_migrate() {
// try migration of main file - ignore if does not exist
if ($file = resourcelib_try_file_migration($resource->mainfile, $candidate->cmid, $candidate->course, 'mod_resource', 'content', 0)) {
$resource->mainfile = $file->get_filepath().$file->get_filename();
+ } else {
+ continue;
}
}

0 comments on commit d27076d

Please sign in to comment.