* (bug 33483) One space to much in header of auto-generated documentation
[lhc/web/wiklou.git] / includes / GlobalFunctions.php
index 5fdcf2a..231dc65 100644 (file)
@@ -1153,7 +1153,7 @@ function wfGetLangObj( $langcode = false ) {
  * @return Language
  */
 function wfUILang() {
-       # wfDeprecated( __METHOD__, '1.18' ); // See r105985 and it's revert. Somewhere still used.
+       wfDeprecated( __METHOD__, '1.18' );
        global $wgLang;
        return $wgLang;
 }
@@ -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" );
        }
@@ -3456,14 +3460,16 @@ function wfGetNull() {
  */
 function wfDeprecated( $function, $version = false, $component = false ) {
        static $functionsWarned = array();
-       
-       if ( !isset( $functionsWarned[$function] ) ) {
+
+       MWDebug::deprecated( $function, $version, $component );
+
+       if ( !in_array( $function, $GLOBALS['wgDeprecationWhitelist'] ) && !isset( $functionsWarned[$function] ) ) {
                $functionsWarned[$function] = true;
                
-               if ( $version && $component === false ) {
+               if ( $version ) {
                        global $wgDeprecationReleaseLimit;
                        
-                       if ( $wgDeprecationReleaseLimit ) {
+                       if ( $wgDeprecationReleaseLimit && $component === false ) {
                                # Strip -* off the end of $version so that branches can use the
                                # format #.##-branchname to avoid issues if the branch is merged into
                                # a version of MediaWiki later than what it was branched from
@@ -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];