r37838 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r37837‎ | r37838 | r37839 >
Date:07:29, 19 July 2008
Author:brion
Status:old
Tags:
Comment:
Cleanup for r37830 & earlier ($wgDirectoryMode default to wfMkdirParents()):
Just check is_null() here. is_int() isn't necessarily safe, as numbers frequently get passed around in what are really strings. :)
Modified paths:
  • /trunk/phase3/includes/GlobalFunctions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/GlobalFunctions.php
@@ -1781,7 +1781,7 @@
17821782 if( file_exists( $fullDir ) )
17831783 return true;
17841784 // If not defined or isn't an int, set to default
1785 - if ( !$mode || !is_int($mode) ) {
 1785+ if ( is_null( $mode ) ) {
17861786 $mode = $wgDirectoryMode;
17871787 }
17881788

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r37830$wgDefaultDirectoryChmod -> $wgDirectoryMode. Less crappy name + docs I shoul...demon18:03, 18 July 2008

Status & tagging log