r48417 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48416‎ | r48417 | r48418 >
Date:14:30, 15 March 2009
Author:demon
Status:ok
Tags:
Comment:
Add optional $caller param to wfMkdirParents(). Should make debugging mkdir() errors easier.
Modified paths:
  • /trunk/phase3/includes/GlobalFunctions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/GlobalFunctions.php
@@ -1997,11 +1997,16 @@
19981998 *
19991999 * @param string $dir Full path to directory to create
20002000 * @param int $mode Chmod value to use, default is $wgDirectoryMode
 2001+ * @param string $caller Optional caller param for debugging.
20012002 * @return bool
20022003 */
2003 -function wfMkdirParents( $dir, $mode = null ) {
 2004+function wfMkdirParents( $dir, $mode = null, $caller = null ) {
20042005 global $wgDirectoryMode;
20052006
 2007+ if ( !is_null( $caller ) ) {
 2008+ wfDebug( "$caller: called wfMkdirParents($dir)" );
 2009+ }
 2010+
20062011 if( strval( $dir ) === '' || file_exists( $dir ) )
20072012 return true;
20082013

Follow-up revisions

RevisionCommit summaryAuthorDate
r101829add \n to a wfDebug() call...hashar16:18, 3 November 2011

Status & tagging log