r38900 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r38899‎ | r38900 | r38901 >
Date:14:24, 8 August 2008
Author:demon
Status:old
Tags:
Comment:
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
Modified paths:
  • /trunk/phase3/includes/FileStore.php (modified) (history)
  • /trunk/phase3/includes/MessageCache.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/MessageCache.php
@@ -110,7 +110,7 @@
111111 global $wgLocalMessageCache;
112112
113113 $filename = "$wgLocalMessageCache/messages-" . wfWikiID() . "-$code";
114 - wfMkdirParents( $wgLocalMessageCache, 0777 ); // might fail
 114+ wfMkdirParents( $wgLocalMessageCache ); // might fail
115115
116116 wfSuppressWarnings();
117117 $file = fopen( $filename, 'w' );
@@ -131,7 +131,7 @@
132132
133133 $filename = "$wgLocalMessageCache/messages-" . wfWikiID() . "-$code";
134134 $tempFilename = $filename . '.tmp';
135 - wfMkdirParents( $wgLocalMessageCache, 0777 ); // might fail
 135+ wfMkdirParents( $wgLocalMessageCache ); // might fail
136136
137137 wfSuppressWarnings();
138138 $file = fopen( $tempFilename, 'w');
Index: trunk/phase3/includes/FileStore.php
@@ -123,7 +123,7 @@
124124 } else {
125125 if( !file_exists( dirname( $destPath ) ) ) {
126126 wfSuppressWarnings();
127 - $ok = mkdir( dirname( $destPath ), 0777, true );
 127+ $ok = wfMkdirParents( dirname( $destPath ) );
128128 wfRestoreWarnings();
129129
130130 if( !$ok ) {

Status & tagging log