revert r108508 which reverted for no good reason
authorJeroen De Dauw <jeroendedauw@users.mediawiki.org>
Wed, 11 Jan 2012 14:11:06 +0000 (14:11 +0000)
committerJeroen De Dauw <jeroendedauw@users.mediawiki.org>
Wed, 11 Jan 2012 14:11:06 +0000 (14:11 +0000)
includes/DefaultSettings.php
includes/GlobalFunctions.php

index e86f0f7..8d6e3d4 100644 (file)
@@ -4101,6 +4101,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 useful
+ * for extension developers unable to not use certain deprecated functions
+ * due to backward compatibility reasons.
+ * @since 1.19
+ * @var array
+ */
+$wgDeprecationWhitelist = array();
+
 /** Only record profiling info for pages that took longer than this */
 $wgProfileLimit = 0.0;
 
index a61420d..db2ff35 100644 (file)
@@ -3463,7 +3463,7 @@ function wfDeprecated( $function, $version = false, $component = false ) {
 
        MWDebug::deprecated( $function, $version, $component );
 
-       if ( !isset( $functionsWarned[$function] ) ) {
+       if ( !in_array( $function, $GLOBALS['wgDeprecationWhitelist'] ) && !isset( $functionsWarned[$function] ) ) {
                $functionsWarned[$function] = true;
                
                if ( $version ) {