$this->root_path = $root . $subdir . '/';
if (!empty($options['ajax'])) {
if (!is_dir($this->root_path)) {
- $created = mkdir($this->root_path, 0700);
+ $created = mkdir($this->root_path, $CFG->directorypermissions);
$ret = array();
$ret['msg'] = get_string('invalidpath', 'repository_filesystem');
$ret['nosearch'] = true;
public function prepare_file($filename) {
global $CFG;
if (!file_exists($CFG->dataroot.'/temp/download')) {
- mkdir($CFG->dataroot.'/temp/download/', 0777, true);
+ mkdir($CFG->dataroot.'/temp/download/', $CFG->directorypermissions, true);
}
if (is_dir($CFG->dataroot.'/temp/download')) {
$dir = $CFG->dataroot.'/temp/download/';