MDL-33409 Newly copied files should take on the userid of the current user, and dates reset

- changed function repository::copy_to_area so it accepts more file attributes, pass changed attributes to it
- changed file_info::copy_to_storage and file_info_stored::copy_to_storage to accept more file attributes
- simplified file size check for moodle files in repository/repository_ajax.php
- removed unused code in repository/repository_ajax.php
This commit is contained in:
Marina Glancy
2012-06-05 09:26:26 +08:00
parent 4db061680e
commit 2dfa16ef8a
5 changed files with 74 additions and 82 deletions
+4 -8
View File
@@ -303,15 +303,11 @@ abstract class file_info {
/**
* Copy content of this file to local storage, overriding current file if needed.
*
* @param int $contextid context ID
* @param string $component component
* @param string $filearea file area
* @param int $itemid item ID
* @param string $filepath file path
* @param string $filename file name
* @return boolean success
* @param array|stdClass $filerecord contains contextid, component, filearea,
* itemid, filepath, filename and optionally other attributes of the new file
* @return bool success
*/
public function copy_to_storage($contextid, $component, $filearea, $itemid, $filepath, $filename) {
public function copy_to_storage($filerecord) {
return false;
}