From: Brion Vibber Date: Tue, 20 Dec 2011 21:52:18 +0000 (+0000) Subject: Revert r106456, r106485: system-wide setting seems to be intended to apply only to... X-Git-Tag: 1.31.0-rc.0~25850 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=65f4955351aafcced0ae23cbb8f8804d91a3dc23;p=lhc%2Fweb%2Fwiklou.git 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. --- 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; } }