"MDL-22754, fixed file permission"

This commit is contained in:
Dongsheng Cai
2010-06-15 05:50:18 +00:00
parent d90b016b1b
commit 3316796dbe
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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
View File
@@ -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/';