Merge branch 'MDL-38366-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE

This commit is contained in:
Marina Glancy
2013-07-10 16:26:59 +10:00
+7 -2
View File
@@ -48,9 +48,14 @@ class repository_filesystem extends repository {
public function __construct($repositoryid, $context = SYSCONTEXTID, $options = array()) {
global $CFG;
parent::__construct($repositoryid, $context, $options);
$root = $CFG->dataroot.'/repository/';
$root = $CFG->dataroot . '/repository/';
$subdir = $this->get_option('fs_path');
$this->root_path = $root . $subdir . '/';
$this->root_path = $root;
if (!empty($subdir)) {
$this->root_path .= $subdir . '/';
}
if (!empty($options['ajax'])) {
if (!is_dir($this->root_path)) {
$created = mkdir($this->root_path, $CFG->directorypermissions, true);