Index: trunk/phase3/includes/parser/Parser.php |
— | — | @@ -2726,14 +2726,10 @@ |
2727 | 2727 | * exceeded, provide the values (optional) |
2728 | 2728 | */ |
2729 | 2729 | function limitationWarn( $limitationType, $current=null, $max=null) { |
2730 | | - $msgName = $limitationType . '-warning'; |
2731 | 2730 | //does no harm if $current and $max are present but are unnecessary for the message |
2732 | | - $warning = wfMsgExt( $msgName, array( 'parsemag', 'escape' ), $current, $max ); |
| 2731 | + $warning = wfMsgExt( "$limitationType-warning", array( 'parsemag', 'escape' ), $current, $max ); |
2733 | 2732 | $this->mOutput->addWarning( $warning ); |
2734 | | - $cat = Title::makeTitleSafe( NS_CATEGORY, wfMsgForContent( $limitationType . '-category' ) ); |
2735 | | - if ( $cat ) { |
2736 | | - $this->mOutput->addCategory( $cat->getDBkey(), $this->getDefaultSort() ); |
2737 | | - } |
| 2733 | + $this->addTrackingCategory( "$limitationType-category" ); |
2738 | 2734 | } |
2739 | 2735 | |
2740 | 2736 | /** |
— | — | @@ -3426,7 +3422,12 @@ |
3427 | 3423 | * @return Bool whether the addition was successful |
3428 | 3424 | */ |
3429 | 3425 | protected function addTrackingCategory( $msg ){ |
3430 | | - $containerCategory = Title::makeTitleSafe( NS_CATEGORY, wfMsgForContent( $msg ) ); |
| 3426 | + $cat = wfMsgForContent( $msg ); |
| 3427 | + |
| 3428 | + # Allow tracking categories to be disabled by setting them to "-" |
| 3429 | + if( $cat === '-' ) return false; |
| 3430 | + |
| 3431 | + $containerCategory = Title::makeTitleSafe( NS_CATEGORY, $cat ); |
3431 | 3432 | if ( $containerCategory ) { |
3432 | 3433 | $this->mOutput->addCategory( $containerCategory->getDBkey(), $this->getDefaultSort() ); |
3433 | 3434 | return true; |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -245,6 +245,9 @@ |
246 | 246 | * (bug 13750) First letter capitalization can now be a per-namespace setting |
247 | 247 | * (bug 21073) "User does not exist" message no longer displayed on sub-sub-pages |
248 | 248 | of existing users |
| 249 | +* (bug 21095) Tracking categories produced by the parser (expensive parser function |
| 250 | + limit exceeded, __NOINDEX__ tracking, etc) can now be disabled by setting the |
| 251 | + system message ([[MediaWiki:expensive-parserfunction-category]] etc) to "-". |
249 | 252 | |
250 | 253 | === Bug fixes in 1.16 === |
251 | 254 | |