Permalink
Browse files

MDL-32851 resource: skip resources with invalid files

  • Loading branch information...
1 parent 68b0cae commit a00d309b33d1bd5d9ba5b5dcd3fe43ee652062da @mackensen mackensen committed May 29, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 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 a00d309

Please sign in to comment.