]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-18293 removed obsoleted checking of return values from insert and update_record
authorskodak <skodak>
Sat, 13 Jun 2009 16:47:05 +0000 (16:47 +0000)
committerskodak <skodak>
Sat, 13 Jun 2009 16:47:05 +0000 (16:47 +0000)
lib/file/file_storage.php

index 4ca660b9135b291bced87660bb17d3ad3487c4df..280bca42b72ebee53054384308f1dde5041352b7 100644 (file)
@@ -473,10 +473,7 @@ class file_storage {
             $directory = $this->create_directory($newrecord->contextid, $newrecord->filearea, $newrecord->itemid, $newrecord->filepath, $newrecord->userid);
             // update the existing directory with the new data
             $newrecord->id = $directory->get_id();
-            if (!$DB->update_record('files', $newrecord)) {
-                throw new stored_file_creation_exception($newrecord->contextid, $newrecord->filearea, $newrecord->itemid,
-                                                         $newrecord->filepath, $newrecord->filename);
-            }
+            $DB->update_record('files', $newrecord);
             return new stored_file($this, $newrecord);
         }