From d3116f845d98ddeb6b5abdb9269bb7f60c981c84 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Fri, 8 Aug 2008 14:24:05 +0000 Subject: [PATCH] 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 --- includes/FileStore.php | 2 +- includes/MessageCache.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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'); -- 2.20.1