diff options
author | Andreas Gohr <andi@splitbrain.org> | 2006-03-04 16:40:38 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2006-03-04 16:40:38 +0100 |
commit | 1ca31cfe69e2d10cce65c4323eb652b355f4c904 (patch) | |
tree | 5783a2da2d5ef9ba40aef392b7ad959740125e4c /lib/exe | |
parent | 7c6f82e59d762d68d99d1a88f449d1035ffa5f76 (diff) | |
download | rpg-1ca31cfe69e2d10cce65c4323eb652b355f4c904.tar.gz rpg-1ca31cfe69e2d10cce65c4323eb652b355f4c904.tar.bz2 |
simplified file permission handling
This patch simpliefies the configuration of the file and directory creation
modes. There is no need to set the umask anymore. Only the wanted permissions
for files and directories are set. An init function compares the wanted modes
with the ones that would be choosen by the system automatically (consulting
the system's umask) and sets the modes for chmod when needed.
darcs-hash:20060304154038-7ad00-5ef1db3a87e42563a602f9d050c681d2ea74682f.gz
Diffstat (limited to 'lib/exe')
-rw-r--r-- | lib/exe/indexer.php | 2 | ||||
-rw-r--r-- | lib/exe/media.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/exe/indexer.php b/lib/exe/indexer.php index 8fe9e35d4..28eaa8284 100644 --- a/lib/exe/indexer.php +++ b/lib/exe/indexer.php @@ -60,7 +60,7 @@ function runIndexer(){ return false; } } - if(isset($conf['dmask'])) { chmod($lock, $conf['dmask']); } + if($conf['dperm']) chmod($lock, $conf['dperm']); require_once(DOKU_INC.'inc/indexer.php'); diff --git a/lib/exe/media.php b/lib/exe/media.php index bbdf1814e..ae0b6efe7 100644 --- a/lib/exe/media.php +++ b/lib/exe/media.php @@ -124,7 +124,7 @@ function media_upload($NS,$AUTH){ io_makeFileDir($fn); if(move_uploaded_file($file['tmp_name'], $fn)) { // set the correct permission here - if(isset($conf['fmask'])) { chmod($fn, $conf['fmask']); } + if($conf['fperm']) chmod($fn, $fperm); msg($lang['uploadsucc'],1); return true; }else{ |