]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-14589 more local --> stored renaming
authorskodak <skodak>
Fri, 8 Aug 2008 09:34:12 +0000 (09:34 +0000)
committerskodak <skodak>
Fri, 8 Aug 2008 09:34:12 +0000 (09:34 +0000)
lib/file/file_info.php
lib/file/file_info_stored.php
lib/file/file_storage.php

index 495fe2c3262c60f68e7ba256f097b76da3012709..eaa3fa95b6883c4a81d34ca779f8268007f3af42 100644 (file)
@@ -71,7 +71,7 @@ abstract class file_info {
         return null;
     }
 
-    public function create_file_from_localfile($newfilename, $fid, $userid=null) {
+    public function create_file_from_storedfile($newfilename, $fid, $userid=null) {
         return null;
     }
 
index 9c2a98f0d04266dda7a8cb5e125f3c197a799eb4..a7ff4a77f6f56b0bc442aae7f62ced54478f6999 100644 (file)
@@ -225,7 +225,7 @@ class file_info_stored extends file_info {
         return null;
     }
 
-    public function create_file_from_localfile($newfilename, $fid, $userid=null) {
+    public function create_file_from_storedfile($newfilename, $fid, $userid=null) {
         if (!$this->is_writable() or $this->lf->get_filename() !== '.') {
             return null;
         }
@@ -251,7 +251,7 @@ class file_info_stored extends file_info {
 
         $fs = get_file_storage();
 
-        if ($file = $fs->create_file_from_localfile($newrecord, $fid)) {
+        if ($file = $fs->create_file_from_storedfile($newrecord, $fid)) {
             return $this->browser->get_file_info($this->context, $file->get_filearea(), $file->get_itemid(), $file->get_filepath(), $file->get_filename());
         }
         return null;
index 42a34b84492273afaaacc33acd53343ae01c0dd3..a4c206751d22383a04be009b84de247805a6d2dc 100644 (file)
@@ -350,7 +350,7 @@ class file_storage {
      * @param int $fid id of existing local file
      * @return object stored_file instance
      */
-    public function create_file_from_localfile($file_record, $fid) {
+    public function create_file_from_storedfile($file_record, $fid) {
         global $DB;
 
         $file_record = (array)$file_record; // we support arrays too