"MDL-22754, fixed file permission"
This commit is contained in:
@@ -37,7 +37,7 @@ class repository_filesystem extends repository {
|
||||
$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;
|
||||
|
||||
+1
-1
@@ -1139,7 +1139,7 @@ abstract class repository {
|
||||
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/';
|
||||
|
||||
Reference in New Issue
Block a user