partial revert of r106872 after discussion with Brion on #mediawiki irc
authorJeroen De Dauw <jeroendedauw@users.mediawiki.org>
Tue, 20 Dec 2011 22:45:14 +0000 (22:45 +0000)
committerJeroen De Dauw <jeroendedauw@users.mediawiki.org>
Tue, 20 Dec 2011 22:45:14 +0000 (22:45 +0000)
includes/DefaultSettings.php
includes/GlobalFunctions.php

index 7c8e0dc..21e9ce2 100644 (file)
@@ -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;
 
index 7f3a472..c97c722 100644 (file)
@@ -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 ) {