follow up to r106456 - use one setting instead two, which apparently made my commit...
authorJeroen De Dauw <jeroendedauw@users.mediawiki.org>
Fri, 16 Dec 2011 23:13:10 +0000 (23:13 +0000)
committerJeroen De Dauw <jeroendedauw@users.mediawiki.org>
Fri, 16 Dec 2011 23:13:10 +0000 (23:13 +0000)
includes/DefaultSettings.php
includes/GlobalFunctions.php

index 5d3d437..1fe7870 100644 (file)
@@ -4062,17 +4062,16 @@ $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.
- */
-$wgDeprecationReleaseLimit = '1.17';
-
-/**
+ * 
+ * $wgDeprecationWarnings['whitelist']
  * Function name whitelist for wfDeprecated warnings. You will not be warned
  * for usage of deprecated functions in this list.
  */
-$wgDeprecationWhitelist = array();
+$wgDeprecationWarnings = array( 'limit' => '1.17', 'whitelist' => array() ); 
 
 /** Only record profiling info for pages that took longer than this */
 $wgProfileLimit = 0.0;
index c8c9bfa..3319227 100644 (file)
@@ -3456,14 +3456,13 @@ function wfGetNull() {
  */
 function wfDeprecated( $function, $version = false, $component = false ) {
        static $functionsWarned = array();
+       global $wgDeprecationWarnings;
        
-       if ( !in_array( $function, $GLOBALS['wgDeprecationWhitelist'] ) && !isset( $functionsWarned[$function] ) ) {
+       if ( !in_array( $function, $wgDeprecationWarnings['whitelist'] ) && !isset( $functionsWarned[$function] ) ) {
                $functionsWarned[$function] = true;
                
                if ( $version ) {
-                       global $wgDeprecationReleaseLimit;
-                       
-                       if ( $wgDeprecationReleaseLimit && $component === false ) {
+                       if ( $wgDeprecationWarnings['limit'] && $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
@@ -3471,7 +3470,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( $wgDeprecationReleaseLimit, $comparableVersion, '<' ) ) {
+                               if ( version_compare( $wgDeprecationWarnings['limit'], $comparableVersion, '<' ) ) {
                                        return;
                                }
                        }