r108615 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108614‎ | r108615 | r108616 >
Date:14:11, 11 January 2012
Author:jeroendedauw
Status:reverted (Comments)
Tags:
Comment:
revert r108508 which reverted for no good reason
Modified paths:
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/GlobalFunctions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/GlobalFunctions.php
@@ -3463,7 +3463,7 @@
34643464
34653465 MWDebug::deprecated( $function, $version, $component );
34663466
3467 - if ( !isset( $functionsWarned[$function] ) ) {
 3467+ if ( !in_array( $function, $GLOBALS['wgDeprecationWhitelist'] ) && !isset( $functionsWarned[$function] ) ) {
34683468 $functionsWarned[$function] = true;
34693469
34703470 if ( $version ) {
Index: trunk/phase3/includes/DefaultSettings.php
@@ -4101,6 +4101,16 @@
41024102 */
41034103 $wgDeprecationReleaseLimit = '1.17';
41044104
 4105+/**
 4106+ * Function name whitelist for wfDeprecated warnings. You will not be warned
 4107+ * for usage of deprecated functions in this list. This is mainly useful
 4108+ * for extension developers unable to not use certain deprecated functions
 4109+ * due to backward compatibility reasons.
 4110+ * @since 1.19
 4111+ * @var array
 4112+ */
 4113+$wgDeprecationWhitelist = array();
 4114+
41054115 /** Only record profiling info for pages that took longer than this */
41064116 $wgProfileLimit = 0.0;
41074117

Follow-up revisions

RevisionCommit summaryAuthorDate
r109020reverts wgDeprecationWhitelist...hashar08:59, 16 January 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r108508reverts $wgDeprecationWhitelist...hashar15:40, 10 January 2012

Comments

#Comment by Hashar (talk | contribs)   17:12, 11 January 2012

Will bring that to wikitech-l since I think this is broken and should not be merged. I already exposed the reason for the reversion.

#Comment by Happy-melon (talk | contribs)   19:41, 11 January 2012

What's wrong with global $wgFoo; ... if( $wgFoo )?? It works for every other global variable in use in MW.

#Comment by Jeroen De Dauw (talk | contribs)   19:43, 11 January 2012

Sure. Feel free to change it if you think that's better. I think having it in one place is clearer and cleaner then in two, but it really doesn't matter much either way.

Status & tagging log