summaryrefslogtreecommitdiff
path: root/lib/exe
diff options
context:
space:
mode:
authorTroels Liebe Bentsen <tlb@rapanden.dk>2006-02-18 19:32:51 +0100
committerTroels Liebe Bentsen <tlb@rapanden.dk>2006-02-18 19:32:51 +0100
commitac9115b0337bc6c9b49cdb05210dd85a270d1594 (patch)
treefa7e2699f86ea0ff578324dd27ea2c4b54170834 /lib/exe
parentc771e9edbaeab519add52cb6ef140f2eec24d217 (diff)
downloadrpg-ac9115b0337bc6c9b49cdb05210dd85a270d1594.tar.gz
rpg-ac9115b0337bc6c9b49cdb05210dd85a270d1594.tar.bz2
Fix wrong umask usage and so we set the correct file premissions.
darcs-hash:20060218183251-ee6b9-798ab2994526311b1e58f04e7684b39b51426887.gz
Diffstat (limited to 'lib/exe')
-rw-r--r--lib/exe/indexer.php2
-rw-r--r--lib/exe/media.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/exe/indexer.php b/lib/exe/indexer.php
index 49b532507..19eea767f 100644
--- a/lib/exe/indexer.php
+++ b/lib/exe/indexer.php
@@ -49,7 +49,7 @@ function runIndexer(){
// try to aquire a lock
$lock = $conf['lockdir'].'/_indexer.lock';
- while(!@mkdir($lock,0777)){
+ while(!@mkdir($lock,$conf['dmode'])){
usleep(50);
if(time()-@filemtime($lock) > 60*5){
// looks like a stale lock - remove it
diff --git a/lib/exe/media.php b/lib/exe/media.php
index cddf258db..47af3c4d3 100644
--- a/lib/exe/media.php
+++ b/lib/exe/media.php
@@ -129,7 +129,7 @@ function media_upload($NS,$AUTH){
io_makeFileDir($fn);
if(move_uploaded_file($file['tmp_name'], $fn)) {
// set the correct permission here
- chmod($fn, 0777 - $conf['umask']);
+ chmod($fn, $conf['fmode'] & ~$conf['umask']);
msg($lang['uploadsucc'],1);
return true;
}else{