Documentation
[lhc/web/wiklou.git] / includes / GlobalFunctions.php
index c8c9bfa..2aab35a 100644 (file)
@@ -2391,6 +2391,10 @@ function wfTempDir() {
 function wfMkdirParents( $dir, $mode = null, $caller = null ) {
        global $wgDirectoryMode;
 
+       if ( FileBackend::isStoragePath( $dir ) ) { // sanity
+               throw new MWException( __FUNCTION__ . " given storage path `$dir`.");
+       }
+
        if ( !is_null( $caller ) ) {
                wfDebug( "$caller: called wfMkdirParents($dir)\n" );
        }
@@ -3348,7 +3352,7 @@ function wfFindFile( $title, $options = array() ) {
  * Get an object referring to a locally registered file.
  * Returns a valid placeholder object if the file does not exist.
  *
- * @param $title Title or String
+ * @param $title Title|String
  * @return File|null A File, or null if passed an invalid Title
  */
 function wfLocalFile( $title ) {
@@ -3456,8 +3460,10 @@ function wfGetNull() {
  */
 function wfDeprecated( $function, $version = false, $component = false ) {
        static $functionsWarned = array();
-       
-       if ( !in_array( $function, $GLOBALS['wgDeprecationWhitelist'] ) && !isset( $functionsWarned[$function] ) ) {
+
+       MWDebug::deprecated( $function, $version, $component );
+
+       if ( !isset( $functionsWarned[$function] ) ) {
                $functionsWarned[$function] = true;
                
                if ( $version ) {
@@ -3497,6 +3503,8 @@ function wfDeprecated( $function, $version = false, $component = false ) {
 function wfWarn( $msg, $callerOffset = 1, $level = E_USER_NOTICE ) {
        global $wgDevelopmentWarnings;
 
+       MWDebug::warning( $msg, $callerOffset + 2 );
+
        $callers = wfDebugBacktrace();
        if ( isset( $callers[$callerOffset + 1] ) ) {
                $callerfunc = $callers[$callerOffset + 1];
@@ -3746,7 +3754,7 @@ function wfGetParserCacheStorage() {
  *
  * @param $event String: event name
  * @param $args Array: parameters passed to hook functions
- * @return Boolean
+ * @return Boolean True if no handler aborted the hook
  */
 function wfRunHooks( $event, $args = array() ) {
        return Hooks::run( $event, $args );