Merge branch 'm33_MDL-60318_Undefined_method_file_storage-move_to_trash' of https://github.com/scara/moodle into MOODLE_33_STABLE
This commit is contained in:
@@ -1326,7 +1326,7 @@ class file_storage {
|
||||
$this->create_file($newrecord);
|
||||
} catch (dml_exception $e) {
|
||||
if ($newfile) {
|
||||
$this->move_to_trash($newrecord->contenthash);
|
||||
$this->filesystem->remove_file($newrecord->contenthash);
|
||||
}
|
||||
throw new stored_file_creation_exception($newrecord->contextid, $newrecord->component, $newrecord->filearea, $newrecord->itemid,
|
||||
$newrecord->filepath, $newrecord->filename, $e->debuginfo);
|
||||
@@ -1445,7 +1445,7 @@ class file_storage {
|
||||
$this->create_file($newrecord);
|
||||
} catch (dml_exception $e) {
|
||||
if ($newfile) {
|
||||
$this->move_to_trash($newrecord->contenthash);
|
||||
$this->filesystem->remove_file($newrecord->contenthash);
|
||||
}
|
||||
throw new stored_file_creation_exception($newrecord->contextid, $newrecord->component, $newrecord->filearea, $newrecord->itemid,
|
||||
$newrecord->filepath, $newrecord->filename, $e->debuginfo);
|
||||
@@ -1580,7 +1580,7 @@ class file_storage {
|
||||
$filerecord->id = $DB->insert_record('files', $filerecord);
|
||||
} catch (dml_exception $e) {
|
||||
if (!empty($newfile)) {
|
||||
$this->move_to_trash($filerecord->contenthash);
|
||||
$this->filesystem->remove_file($filerecord->contenthash);
|
||||
}
|
||||
throw new stored_file_creation_exception($filerecord->contextid, $filerecord->component, $filerecord->filearea, $filerecord->itemid,
|
||||
$filerecord->filepath, $filerecord->filename, $e->debuginfo);
|
||||
|
||||
Reference in New Issue
Block a user