Index: trunk/extensions/FlaggedRevs/language/Stabilization.i18n.php |
— | — | @@ -51,6 +51,7 @@ |
52 | 52 | 'stabilize_expiry_invalid' => 'Invalid expiration date.', |
53 | 53 | 'stabilize_expiry_old' => 'This expiration time has already passed.', |
54 | 54 | 'stabilize_denied' => 'Permission denied.', |
| 55 | + 'stabilize_protect_quota' => 'The maximum number of currently flag-protected pages has already been reached.', # do not translate |
55 | 56 | 'stabilize-expiring' => 'expires $1 (UTC)', |
56 | 57 | 'stabilization-review' => 'Mark the current revision checked', |
57 | 58 | ); |
Index: trunk/extensions/FlaggedRevs/forms/PageStabilityForm.php |
— | — | @@ -553,6 +553,18 @@ |
554 | 554 | } |
555 | 555 | |
556 | 556 | protected function reallyCheckSettings() { |
| 557 | + # WMF temp hack...protection limit quota |
| 558 | + global $wgFlaggedRevsProtectQuota; |
| 559 | + if ( isset( $wgFlaggedRevsProtectQuota ) // quota exists |
| 560 | + && $this->autoreview != '' // and we are protecting |
| 561 | + && FlaggedRevs::getProtectionLevel( $this->oldConfig ) == 'none' ) // and page is unprotected |
| 562 | + { |
| 563 | + $dbw = wfGetDB( DB_MASTER ); |
| 564 | + $count = $dbw->selectField( 'flaggedpage_config', 'COUNT(*)', '', __METHOD__ ); |
| 565 | + if ( $count >= $wgFlaggedRevsProtectQuota ) { |
| 566 | + return 'stabilize_protect_quota'; |
| 567 | + } |
| 568 | + } |
557 | 569 | $this->loadReason(); |
558 | 570 | $this->loadExpiry(); |
559 | 571 | # Autoreview only when protecting currently unprotected pages |