Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -3456,14 +3456,13 @@ |
3457 | 3457 | */ |
3458 | 3458 | function wfDeprecated( $function, $version = false, $component = false ) { |
3459 | 3459 | static $functionsWarned = array(); |
| 3460 | + global $wgDeprecationWarnings; |
3460 | 3461 | |
3461 | | - if ( !in_array( $function, $GLOBALS['wgDeprecationWhitelist'] ) && !isset( $functionsWarned[$function] ) ) { |
| 3462 | + if ( !in_array( $function, $wgDeprecationWarnings['whitelist'] ) && !isset( $functionsWarned[$function] ) ) { |
3462 | 3463 | $functionsWarned[$function] = true; |
3463 | 3464 | |
3464 | 3465 | if ( $version ) { |
3465 | | - global $wgDeprecationReleaseLimit; |
3466 | | - |
3467 | | - if ( $wgDeprecationReleaseLimit && $component === false ) { |
| 3466 | + if ( $wgDeprecationWarnings['limit'] && $component === false ) { |
3468 | 3467 | # Strip -* off the end of $version so that branches can use the |
3469 | 3468 | # format #.##-branchname to avoid issues if the branch is merged into |
3470 | 3469 | # a version of MediaWiki later than what it was branched from |
— | — | @@ -3471,7 +3470,7 @@ |
3472 | 3471 | |
3473 | 3472 | # If the comparableVersion is larger than our release limit then |
3474 | 3473 | # skip the warning message for the deprecation |
3475 | | - if ( version_compare( $wgDeprecationReleaseLimit, $comparableVersion, '<' ) ) { |
| 3474 | + if ( version_compare( $wgDeprecationWarnings['limit'], $comparableVersion, '<' ) ) { |
3476 | 3475 | return; |
3477 | 3476 | } |
3478 | 3477 | } |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -4062,17 +4062,16 @@ |
4063 | 4063 | $wgDevelopmentWarnings = false; |
4064 | 4064 | |
4065 | 4065 | /** |
| 4066 | + * $wgDeprecationWarnings['limit'] |
4066 | 4067 | * Release limitation to wfDeprecated warnings, if set to a release number |
4067 | 4068 | * development warnings will not be generated for deprecations added in releases |
4068 | 4069 | * after the limit. |
4069 | | - */ |
4070 | | -$wgDeprecationReleaseLimit = '1.17'; |
4071 | | - |
4072 | | -/** |
| 4070 | + * |
| 4071 | + * $wgDeprecationWarnings['whitelist'] |
4073 | 4072 | * Function name whitelist for wfDeprecated warnings. You will not be warned |
4074 | 4073 | * for usage of deprecated functions in this list. |
4075 | 4074 | */ |
4076 | | -$wgDeprecationWhitelist = array(); |
| 4075 | +$wgDeprecationWarnings = array( 'limit' => '1.17', 'whitelist' => array() ); |
4077 | 4076 | |
4078 | 4077 | /** Only record profiling info for pages that took longer than this */ |
4079 | 4078 | $wgProfileLimit = 0.0; |