From: Chad Horohoe Date: Fri, 8 Aug 2008 14:24:05 +0000 (+0000) Subject: Should be the last of the 0777's :) X-Git-Tag: 1.31.0-rc.0~46014 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=d3116f845d98ddeb6b5abdb9269bb7f60c981c84;p=lhc%2Fweb%2Fwiklou.git Should be the last of the 0777's :) * Use wfMkdirParents() instead of mkdir() with a recursive argument. * Also, allow $wgDirectoryMode take over, instead of hardcoding 0777. * +formatting --- diff --git a/includes/FileStore.php b/includes/FileStore.php index c01350c0e2..a5b04a6792 100644 --- a/includes/FileStore.php +++ b/includes/FileStore.php @@ -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 ) { diff --git a/includes/MessageCache.php b/includes/MessageCache.php index 39e64108f1..0b840bd213 100644 --- a/includes/MessageCache.php +++ b/includes/MessageCache.php @@ -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');