Should be the last of the 0777's :)
authorChad Horohoe <demon@users.mediawiki.org>
Fri, 8 Aug 2008 14:24:05 +0000 (14:24 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Fri, 8 Aug 2008 14:24:05 +0000 (14:24 +0000)
* Use wfMkdirParents() instead of mkdir() with a recursive argument.
* Also, allow $wgDirectoryMode take over, instead of hardcoding 0777.
* +formatting

includes/FileStore.php
includes/MessageCache.php

index c01350c..a5b04a6 100644 (file)
@@ -123,7 +123,7 @@ class FileStore {
                } else {
                        if( !file_exists( dirname( $destPath ) ) ) {
                                wfSuppressWarnings();
-                               $ok = mkdir( dirname( $destPath ), 0777, true );
+                               $ok = wfMkdirParents( dirname( $destPath ) );
                                wfRestoreWarnings();
 
                                if( !$ok ) {
index 39e6410..0b840bd 100644 (file)
@@ -110,7 +110,7 @@ class MessageCache {
                global $wgLocalMessageCache;
 
                $filename = "$wgLocalMessageCache/messages-" . wfWikiID() . "-$code";
-               wfMkdirParents( $wgLocalMessageCache, 0777 ); // might fail
+               wfMkdirParents( $wgLocalMessageCache ); // might fail
 
                wfSuppressWarnings();
                $file = fopen( $filename, 'w' );
@@ -131,7 +131,7 @@ class MessageCache {
 
                $filename = "$wgLocalMessageCache/messages-" . wfWikiID() . "-$code";
                $tempFilename = $filename . '.tmp';
-       wfMkdirParents( $wgLocalMessageCache, 0777 ); // might fail
+               wfMkdirParents( $wgLocalMessageCache ); // might fail
 
                wfSuppressWarnings();
                $file = fopen( $tempFilename, 'w');