r40418 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r40417‎ | r40418 | r40419 >
Date:04:15, 4 September 2008
Author:demon
Status:old
Tags:
Comment:
No more icky mkdir() calls. Grepping for mkdir() now returns nothing :)
Modified paths:
  • /trunk/phase3/includes/HTMLFileCache.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/HTMLFileCache.php
@@ -114,8 +114,8 @@
115115 $mydir2=substr($filename,0,strrpos($filename,'/')); # subdirectory level 2
116116 $mydir1=substr($mydir2,0,strrpos($mydir2,'/')); # subdirectory level 1
117117
118 - if(!file_exists($mydir1)) { mkdir($mydir1,0775); } # create if necessary
119 - if(!file_exists($mydir2)) { mkdir($mydir2,0775); }
 118+ wfMkdirParents( $mydir1 );
 119+ wfMkdirParents( $mydir2 );
120120 }
121121
122122 function saveToFileCache( $origtext ) {

Status & tagging log