Add optional $caller param to wfMkdirParents(). Should make debugging mkdir() errors...
authorChad Horohoe <demon@users.mediawiki.org>
Sun, 15 Mar 2009 14:30:39 +0000 (14:30 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Sun, 15 Mar 2009 14:30:39 +0000 (14:30 +0000)
includes/GlobalFunctions.php

index 2605ad0..2936a1e 100644 (file)
@@ -1997,11 +1997,16 @@ function wfTempDir() {
  * 
  * @param string $dir Full path to directory to create
  * @param int $mode Chmod value to use, default is $wgDirectoryMode
+ * @param string $caller Optional caller param for debugging.
  * @return bool
  */
-function wfMkdirParents( $dir, $mode = null ) {
+function wfMkdirParents( $dir, $mode = null, $caller = null ) {
        global $wgDirectoryMode;
 
+       if ( !is_null( $caller ) ) {
+               wfDebug( "$caller: called wfMkdirParents($dir)" );
+       }
+
        if( strval( $dir ) === '' || file_exists( $dir ) )
                return true;