summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandi <andi@splitbrain.org>2005-01-29 12:36:21 +0100
committerandi <andi@splitbrain.org>2005-01-29 12:36:21 +0100
commitb3222a5c05db1803dc03e8818ee8e6756f123ed0 (patch)
tree19ccb71656473a7308d2e9603c96ee877fbc998e
parente647351c391704af7245316856e36e4986a9e4e4 (diff)
downloadrpg-b3222a5c05db1803dc03e8818ee8e6756f123ed0.tar.gz
rpg-b3222a5c05db1803dc03e8818ee8e6756f123ed0.tar.bz2
workaround for php umask bug (fixes #97)
darcs-hash:20050129113621-9977f-a3439b9f7a590d3c64522046e79001f0ba9b199b.gz
-rw-r--r--doku.php3
-rw-r--r--inc/common.php3
-rw-r--r--media.php4
3 files changed, 9 insertions, 1 deletions
diff --git a/doku.php b/doku.php
index f18bd697b..36aece430 100644
--- a/doku.php
+++ b/doku.php
@@ -162,4 +162,7 @@
}
if(substr($ACT,0,6) != 'export') html_footer();
+
+ //restore old umask
+ umask($conf['oldumask']);
?>
diff --git a/inc/common.php b/inc/common.php
index 9b1c2900f..dff4bba18 100644
--- a/inc/common.php
+++ b/inc/common.php
@@ -38,6 +38,9 @@
$conf['usegzip'] = 0;
}
+ //remember original umask
+ $conf['oldumask'] = umask();
+
/**
* remove magic quotes recursivly
*
diff --git a/media.php b/media.php
index 354910f0e..7b57181a9 100644
--- a/media.php
+++ b/media.php
@@ -4,7 +4,6 @@ require_once("conf/dokuwiki.php");
require_once("inc/common.php");
require_once("lang/en/lang.php");
require_once("lang/".$conf['lang']."/lang.php");
-setCorrectLocale();
require_once("inc/html.php");
require_once("inc/search.php");
require_once("inc/format.php");
@@ -54,6 +53,9 @@ html_head();
</body>
</html>
<?
+//restore old umask
+umask($conf['oldumask']);
+
/**********************************************/
function media_upload($NS){