Revert r106456, r106485: system-wide setting seems to be intended to apply only to...
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 20 Dec 2011 21:52:18 +0000 (21:52 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 20 Dec 2011 21:52:18 +0000 (21:52 +0000)
includes/DefaultSettings.php
includes/GlobalFunctions.php

index 0b7d4d3..7c8e0dc 100644 (file)
@@ -4084,16 +4084,11 @@ $wgShowHostnames = false;
 $wgDevelopmentWarnings = false;
 
 /**
- * $wgDeprecationWarnings['limit']
  * Release limitation to wfDeprecated warnings, if set to a release number
  * development warnings will not be generated for deprecations added in releases
  * after the limit.
- * 
- * $wgDeprecationWarnings['whitelist']
- * Function name whitelist for wfDeprecated warnings. You will not be warned
- * for usage of deprecated functions in this list.
  */
-$wgDeprecationWarnings = array( 'limit' => '1.17', 'whitelist' => array() ); 
+$wgDeprecationReleaseLimit = '1.17';
 
 /** Only record profiling info for pages that took longer than this */
 $wgProfileLimit = 0.0;
index de0221c..7f3a472 100644 (file)
@@ -3460,13 +3460,14 @@ function wfGetNull() {
  */
 function wfDeprecated( $function, $version = false, $component = false ) {
        static $functionsWarned = array();
-       global $wgDeprecationWarnings;
        
-       if ( !in_array( $function, $wgDeprecationWarnings['whitelist'] ) && !isset( $functionsWarned[$function] ) ) {
+       if ( !isset( $functionsWarned[$function] ) ) {
                $functionsWarned[$function] = true;
                
                if ( $version ) {
-                       if ( $wgDeprecationWarnings['limit'] && $component === false ) {
+                       global $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
@@ -3474,7 +3475,7 @@ function wfDeprecated( $function, $version = false, $component = false ) {
                                
                                # If the comparableVersion is larger than our release limit then
                                # skip the warning message for the deprecation
-                               if ( version_compare( $wgDeprecationWarnings['limit'], $comparableVersion, '<' ) ) {
+                               if ( version_compare( $wgDeprecationReleaseLimit, $comparableVersion, '<' ) ) {
                                        return;
                                }
                        }