Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 263... Línea 263...
263
        $filerecord->pathnamehash = $this->fs->get_pathname_hash($this->file_record->contextid, $this->file_record->component, $this->file_record->filearea, $this->file_record->itemid, $filepath, $filename);
263
        $filerecord->pathnamehash = $this->fs->get_pathname_hash($this->file_record->contextid, $this->file_record->component, $this->file_record->filearea, $this->file_record->itemid, $filepath, $filename);
264
        $this->update($filerecord);
264
        $this->update($filerecord);
265
    }
265
    }
Línea 266... Línea 266...
266
 
266
 
267
    /**
-
 
268
     * Function stored_file::replace_content_with() is deprecated. Please use stored_file::replace_file_with()
-
 
269
     *
-
 
270
     * @deprecated since Moodle 2.6 MDL-42016 - please do not use this function any more.
-
 
271
     * @see stored_file::replace_file_with()
-
 
272
     */
-
 
273
    public function replace_content_with(stored_file $storedfile) {
-
 
274
        throw new coding_exception('Function stored_file::replace_content_with() can not be used any more . ' .
-
 
275
            'Please use stored_file::replace_file_with()');
-
 
276
    }
-
 
277
 
-
 
278
    /**
267
    /**
279
     * Replaces the fields that might have changed when file was overriden in filepicker:
268
     * Replaces the fields that might have changed when file was overriden in filepicker:
280
     * reference, contenthash, filesize, userid
269
     * reference, contenthash, filesize, userid
281
     *
270
     *
282
     * Note that field 'source' must be updated separately because
271
     * Note that field 'source' must be updated separately because
Línea 538... Línea 527...
538
     * @param string $pathname target directory
527
     * @param string $pathname target directory
539
     * @param file_progress $progress Progress indicator callback or null if not required
528
     * @param file_progress $progress Progress indicator callback or null if not required
540
     * @return array|bool list of processed files; false if error
529
     * @return array|bool list of processed files; false if error
541
     */
530
     */
542
    public function extract_to_pathname(file_packer $packer, $pathname,
531
    public function extract_to_pathname(file_packer $packer, $pathname,
543
            file_progress $progress = null) {
532
            ?file_progress $progress = null) {
544
        return $this->filesystem->extract_to_pathname($this, $packer, $pathname, $progress);
533
        return $this->filesystem->extract_to_pathname($this, $packer, $pathname, $progress);
545
    }
534
    }
Línea 546... Línea 535...
546
 
535
 
547
    /**
536
    /**
Línea 556... Línea 545...
556
     * @param int $userid user ID
545
     * @param int $userid user ID
557
     * @param file_progress $progress Progress indicator callback or null if not required
546
     * @param file_progress $progress Progress indicator callback or null if not required
558
     * @return array|bool list of processed files; false if error
547
     * @return array|bool list of processed files; false if error
559
     */
548
     */
560
    public function extract_to_storage(file_packer $packer, $contextid,
549
    public function extract_to_storage(file_packer $packer, $contextid,
561
            $component, $filearea, $itemid, $pathbase, $userid = null, file_progress $progress = null) {
550
            $component, $filearea, $itemid, $pathbase, $userid = null, ?file_progress $progress = null) {
Línea 562... Línea 551...
562
 
551
 
563
        return $this->filesystem->extract_to_storage($this, $packer, $contextid, $component, $filearea,
552
        return $this->filesystem->extract_to_storage($this, $packer, $contextid, $component, $filearea,
564
                $itemid, $pathbase, $userid, $progress);
553
                $itemid, $pathbase, $userid, $progress);
Línea 747... Línea 736...
747
        $this->sync_external_file();
736
        $this->sync_external_file();
748
        return $this->file_record->filesize;
737
        return $this->file_record->filesize;
749
    }
738
    }
Línea 750... Línea 739...
750
 
739
 
751
     /**
-
 
752
     * Function stored_file::set_filesize() is deprecated. Please use stored_file::replace_file_with
-
 
753
     *
-
 
754
     * @deprecated since Moodle 2.6 MDL-42016 - please do not use this function any more.
-
 
755
     * @see stored_file::replace_file_with()
-
 
756
     */
-
 
757
    public function set_filesize($filesize) {
-
 
758
        throw new coding_exception('Function stored_file::set_filesize() can not be used any more. ' .
-
 
759
            'Please use stored_file::replace_file_with()');
-
 
760
    }
-
 
761
 
-
 
762
    /**
740
     /**
763
     * Returns mime type of file.
741
     * Returns mime type of file.
764
     *
742
     *
765
     * @return string
743
     * @return string
766
     */
744
     */
Línea 972... Línea 950...
972
    public function get_referencelastsync() {
950
    public function get_referencelastsync() {
973
        return $this->file_record->referencelastsync;
951
        return $this->file_record->referencelastsync;
974
    }
952
    }
Línea 975... Línea 953...
975
 
953
 
976
    /**
-
 
977
     * Function stored_file::get_referencelifetime() is deprecated as reference
-
 
978
     * life time is no longer stored in DB or returned by repository. Each
-
 
979
     * repository should decide by itself when to synchronise the references.
-
 
980
     *
-
 
981
     * @deprecated since Moodle 2.6 MDL-42016 - please do not use this function any more.
-
 
982
     * @see repository::sync_reference()
-
 
983
     */
-
 
984
    public function get_referencelifetime() {
-
 
985
        throw new coding_exception('Function stored_file::get_referencelifetime() can not be used any more. ' .
-
 
986
            'See repository::sync_reference().');
-
 
987
    }
-
 
988
    /**
954
    /**
989
     * Returns file reference
955
     * Returns file reference
990
     *
956
     *
991
     * @return string
957
     * @return string
992
     */
958
     */