"MDL-22523, fixed file system plugin bug"

This commit is contained in:
Dongsheng Cai
2010-05-20 07:10:00 +00:00
parent cb0336e91a
commit 951d2d5529
+6 -1
View File
@@ -114,11 +114,16 @@ class repository_filesystem extends repository {
public function global_search() {
return false;
}
// move file to local moodle
/**
* Return file path
* @return array
*/
public function get_file($file, $title = '') {
global $CFG;
if ($file{0} == '/') {
$file = $this->root_path.substr($file, 1, strlen($file)-1);
} else {
$file = $this->root_path.$file;
}
// this is a hack to prevent move_to_file deleteing files
// in local repository