From: Chad Horohoe Date: Sun, 15 Mar 2009 14:30:39 +0000 (+0000) Subject: Add optional $caller param to wfMkdirParents(). Should make debugging mkdir() errors... X-Git-Tag: 1.31.0-rc.0~42482 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=1c4c27d3d1c8e0e173282a9715dc4e10ae3fb6ba;p=lhc%2Fweb%2Fwiklou.git Add optional $caller param to wfMkdirParents(). Should make debugging mkdir() errors easier. --- diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 2605ad002f..2936a1e680 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -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;