mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-23781 lesson - files upgrade fatal error fixed
This commit is contained in:
parent
38ead57d34
commit
7dcce47503
1 changed files with 1 additions and 1 deletions
|
@ -213,7 +213,7 @@ function xmldb_lesson_upgrade($oldversion) {
|
|||
$filepathname = clean_param('/'.$lesson->mediafile, PARAM_PATH);
|
||||
$fullpath = "/$context->id/mod_lesson/mediafile/0$filepathname";
|
||||
|
||||
if ($fs->get_file_by_hash(sha1($fullpath)) and !$file->is_directory()) {
|
||||
if ($file = $fs->get_file_by_hash(sha1($fullpath)) and !$file->is_directory()) {
|
||||
// already converted, just update filename
|
||||
$DB->set_field('lesson', 'mediafile', $filepathname, array('id'=>$lesson->id));
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue