From 0ddef438be8910636c10bb7fd1b7e536f1dc04ff Mon Sep 17 00:00:00 2001 From: Jeroen De Dauw Date: Tue, 20 Dec 2011 22:45:14 +0000 Subject: [PATCH] partial revert of r106872 after discussion with Brion on #mediawiki irc --- includes/DefaultSettings.php | 10 ++++++++++ includes/GlobalFunctions.php | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 7c8e0dc449..21e9ce2d96 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -4090,6 +4090,16 @@ $wgDevelopmentWarnings = false; */ $wgDeprecationReleaseLimit = '1.17'; +/** + * Function name whitelist for wfDeprecated warnings. You will not be warned + * for usage of deprecated functions in this list. This is mainly usefull + * for extension developers unable to not use certain deprecated functions + * due to backward compatinility reasons. + * @since 1.19 + * @var array + */ +$wgDeprecationWhitelist = array(); + /** 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 7f3a472eec..c97c7228af 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -3461,7 +3461,7 @@ function wfGetNull() { function wfDeprecated( $function, $version = false, $component = false ) { static $functionsWarned = array(); - if ( !isset( $functionsWarned[$function] ) ) { + if ( !in_array( $function, $GLOBALS['wgDeprecationWhitelist'] ) && !isset( $functionsWarned[$function] ) ) { $functionsWarned[$function] = true; if ( $version ) { -- 2.20.1