From 65f4955351aafcced0ae23cbb8f8804d91a3dc23 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 20 Dec 2011 21:52:18 +0000 Subject: [PATCH] Revert r106456, r106485: system-wide setting seems to be intended to apply only to specific extensions' code but wouldn't? Also weird config parameter combining two unrelated things into one. --- includes/DefaultSettings.php | 7 +------ includes/GlobalFunctions.php | 9 +++++---- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 0b7d4d3689..7c8e0dc449 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -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; diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index de0221c97c..7f3a472eec 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -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; } } -- 2.20.1