Index: trunk/extensions/CodeReview/backend/CodeRepository.php |
— | — | @@ -126,7 +126,32 @@ |
127 | 127 | $wgMemc->set( $key, $authors, 3600 * 24 ); |
128 | 128 | return $authors; |
129 | 129 | } |
| 130 | + |
| 131 | + public function getAuthorCount() { |
| 132 | + global $wgMemc; |
| 133 | + $key = wfMemcKey( 'codereview', 'authorcount', $this->getId() ); |
| 134 | + $authorsCount = $wgMemc->get( $key ); |
| 135 | + if ( is_int( $authorsCount ) ) { |
| 136 | + return $authorsCount; |
| 137 | + } |
| 138 | + $dbr = wfGetDB( DB_SLAVE ); |
| 139 | + $row = $dbr->select( |
| 140 | + 'code_authors', |
| 141 | + array( 'COUNT(cr_author) AS author_count' ), |
| 142 | + array( 'cr_repo_id' => $this->getId() ), |
| 143 | + __METHOD__ |
| 144 | + ); |
130 | 145 | |
| 146 | + if ( !$row ) { |
| 147 | + throw new MWException( 'Failed to load expected author count' ); |
| 148 | + } |
| 149 | + |
| 150 | + $authorsCount = $row->author_count; |
| 151 | + |
| 152 | + $wgMemc->set( $key, $authorsCount, 3600 * 24 ); |
| 153 | + return $authorsCount; |
| 154 | + } |
| 155 | + |
131 | 156 | public function getTagList() { |
132 | 157 | global $wgMemc; |
133 | 158 | $key = wfMemcKey( 'codereview', 'tags', $this->getId() ); |
— | — | @@ -167,8 +192,9 @@ |
168 | 193 | ), |
169 | 194 | __METHOD__ |
170 | 195 | ); |
171 | | - if ( !$row ) |
| 196 | + if ( !$row ) { |
172 | 197 | throw new MWException( 'Failed to load expected revision data' ); |
| 198 | + } |
173 | 199 | return CodeRevision::newFromRow( $this, $row ); |
174 | 200 | } |
175 | 201 | |
Index: trunk/extensions/CodeReview/ui/CodeAuthorListView.php |
— | — | @@ -12,7 +12,7 @@ |
13 | 13 | $authors = $this->mRepo->getAuthorList(); |
14 | 14 | $repo = $this->mRepo->getName(); |
15 | 15 | $text = wfMsg( 'code-authors-text' ) . "\n\n"; |
16 | | - $text .= '<strong>' . wfMsg( 'code-author-total', $wgLang->formatNum( count( $authors ) ) ) . "</strong>\n"; |
| 16 | + $text .= '<strong>' . wfMsg( 'code-author-total', $wgLang->formatNum( $this->mRepo->getAuthorCount() ) ) . "</strong>\n"; |
17 | 17 | foreach ( $authors as $committer ) { |
18 | 18 | if ( $committer ) { |
19 | 19 | $text .= "* [[Special:Code/$repo/author/$committer|$committer]]"; |
Index: trunk/extensions/OAI/OAIRepo_body.php |
— | — | @@ -17,7 +17,7 @@ |
18 | 18 | |
19 | 19 | class SpecialOAIRepository extends UnlistedSpecialPage { |
20 | 20 | function __construct() { |
21 | | - UnlistedSpecialPage::UnlistedSpecialPage( 'OAIRepository' ); |
| 21 | + parent::UnlistedSpecialPage( 'OAIRepository' ); |
22 | 22 | } |
23 | 23 | |
24 | 24 | function setHeaders() { |
Index: trunk/extensions/CentralNotice/SpecialCentralNotice.php |
— | — | @@ -11,7 +11,7 @@ |
12 | 12 | |
13 | 13 | function CentralNotice() { |
14 | 14 | // Register special page |
15 | | - SpecialPage::SpecialPage( 'CentralNotice' ); |
| 15 | + parent::SpecialPage( 'CentralNotice' ); |
16 | 16 | |
17 | 17 | // Internationalization |
18 | 18 | wfLoadExtensionMessages( 'CentralNotice' ); |
Index: trunk/extensions/CentralNotice/CentralNotice.db.php |
— | — | @@ -11,7 +11,7 @@ |
12 | 12 | |
13 | 13 | function CentralNoticeDB() { |
14 | 14 | // Register special page |
15 | | - SpecialPage::SpecialPage( 'CentralNotice' ); |
| 15 | + parent::SpecialPage( 'CentralNotice' ); |
16 | 16 | |
17 | 17 | // Internationalization |
18 | 18 | wfLoadExtensionMessages( 'CentralNotice' ); |
Index: trunk/extensions/GlobalBlocking/SpecialRemoveGlobalBlock.php |
— | — | @@ -5,7 +5,7 @@ |
6 | 6 | |
7 | 7 | function __construct() { |
8 | 8 | wfLoadExtensionMessages('GlobalBlocking'); |
9 | | - SpecialPage::SpecialPage( 'RemoveGlobalBlock', 'globalunblock' ); |
| 9 | + parent::SpecialPage( 'RemoveGlobalBlock', 'globalunblock' ); |
10 | 10 | } |
11 | 11 | |
12 | 12 | function execute( $par ) { |
Index: trunk/extensions/GlobalBlocking/SpecialGlobalBlock.php |
— | — | @@ -7,7 +7,7 @@ |
8 | 8 | |
9 | 9 | function __construct() { |
10 | 10 | wfLoadExtensionMessages('GlobalBlocking'); |
11 | | - SpecialPage::SpecialPage( 'GlobalBlock', 'globalblock' ); |
| 11 | + parent::SpecialPage( 'GlobalBlock', 'globalblock' ); |
12 | 12 | } |
13 | 13 | |
14 | 14 | function execute( $par ) { |
Index: trunk/extensions/GlobalBlocking/SpecialGlobalBlockStatus.php |
— | — | @@ -5,7 +5,7 @@ |
6 | 6 | |
7 | 7 | function __construct() { |
8 | 8 | wfLoadExtensionMessages('GlobalBlocking'); |
9 | | - SpecialPage::SpecialPage( 'GlobalBlockStatus', 'globalblock-whitelist' ); |
| 9 | + parent::SpecialPage( 'GlobalBlockStatus', 'globalblock-whitelist' ); |
10 | 10 | } |
11 | 11 | |
12 | 12 | function execute( $par ) { |
Index: trunk/extensions/Gadgets/SpecialGadgets.php |
— | — | @@ -23,7 +23,7 @@ |
24 | 24 | * Constructor |
25 | 25 | */ |
26 | 26 | function __construct() { |
27 | | - SpecialPage::SpecialPage( 'Gadgets', '', true ); |
| 27 | + parent::SpecialPage( 'Gadgets', '', true ); |
28 | 28 | } |
29 | 29 | |
30 | 30 | /** |
Index: trunk/extensions/Cite/SpecialCite_body.php |
— | — | @@ -10,7 +10,7 @@ |
11 | 11 | |
12 | 12 | class SpecialCite extends SpecialPage { |
13 | 13 | function SpecialCite() { |
14 | | - SpecialPage::SpecialPage( 'Cite' ); |
| 14 | + parent::SpecialPage( 'Cite' ); |
15 | 15 | } |
16 | 16 | |
17 | 17 | function execute( $par ) { |
Index: trunk/extensions/CategoryTree/CategoryTreePage.php |
— | — | @@ -23,7 +23,7 @@ |
24 | 24 | * Constructor |
25 | 25 | */ |
26 | 26 | function __construct() { |
27 | | - SpecialPage::SpecialPage( 'CategoryTree', '', true ); |
| 27 | + parent::SpecialPage( 'CategoryTree', '', true ); |
28 | 28 | wfLoadExtensionMessages( 'CategoryTree' ); |
29 | 29 | } |
30 | 30 | |
Index: trunk/extensions/CategoryTree/CategoryTreeFunctions.php |
— | — | @@ -387,7 +387,7 @@ |
388 | 388 | } |
389 | 389 | else { |
390 | 390 | if ( !$hideroot ) { |
391 | | - $html .= CategoryTree::renderNode( $title, $depth, $wgCategoryTreeDynamicTag ); |
| 391 | + $html .= $this->renderNode( $title, $depth, $wgCategoryTreeDynamicTag ); |
392 | 392 | } else if ( !$wgCategoryTreeDynamicTag ) { |
393 | 393 | $html .= $this->renderChildren( $title, $depth ); |
394 | 394 | } else { |
Index: trunk/extensions/CentralAuth/SpecialGlobalGroupMembership.php |
— | — | @@ -9,7 +9,7 @@ |
10 | 10 | var $mGlobalUser; |
11 | 11 | |
12 | 12 | function SpecialGlobalGroupMembership() { |
13 | | - SpecialPage::SpecialPage( 'GlobalGroupMembership' ); |
| 13 | + parent::SpecialPage( 'GlobalGroupMembership' ); |
14 | 14 | wfLoadExtensionMessages( 'SpecialCentralAuth' ); |
15 | 15 | |
16 | 16 | global $wgUser; |
Index: trunk/extensions/FlaggedRevs/forms/PageStabilityForm.php |
— | — | @@ -502,7 +502,7 @@ |
503 | 503 | 'FOR UPDATE' |
504 | 504 | ); |
505 | 505 | # Check if this is not the same config as the existing row (if any) |
506 | | - $changed = self::configIsDifferent( $oldRow, |
| 506 | + $changed = $this->configIsDifferent( $oldRow, |
507 | 507 | $this->select, $this->override, $this->autoreview, $dbExpiry ); |
508 | 508 | # If the new config is different, replace the old row... |
509 | 509 | if ( $changed ) { |
— | — | @@ -618,7 +618,7 @@ |
619 | 619 | 'FOR UPDATE' |
620 | 620 | ); |
621 | 621 | # Check if this is not the same config as the existing row (if any) |
622 | | - $changed = self::configIsDifferent( $oldRow, |
| 622 | + $changed = $this->configIsDifferent( $oldRow, |
623 | 623 | $this->override, $this->autoreview, $dbExpiry ); |
624 | 624 | # If the new config is different, replace the old row... |
625 | 625 | if ( $changed ) { |
Index: trunk/extensions/FlaggedRevs/specialpages/QualityOversight_body.php |
— | — | @@ -7,7 +7,7 @@ |
8 | 8 | class QualityOversight extends SpecialPage |
9 | 9 | { |
10 | 10 | public function __construct() { |
11 | | - SpecialPage::SpecialPage( 'QualityOversight' ); |
| 11 | + parent::SpecialPage( 'QualityOversight' ); |
12 | 12 | } |
13 | 13 | |
14 | 14 | public function execute( $par ) { |
Index: trunk/extensions/FlaggedRevs/FlaggedArticleView.php |
— | — | @@ -401,7 +401,7 @@ |
402 | 402 | $revsSince = $this->article->getPendingRevCount(); |
403 | 403 | $tooltip = wfMsgHtml( 'revreview-draft-title' ); |
404 | 404 | $pending = $prot; |
405 | | - if ( self::showRatingIcon() ) { |
| 405 | + if ( $this->showRatingIcon() ) { |
406 | 406 | $pending .= FlaggedRevsXML::draftStatusIcon(); |
407 | 407 | } |
408 | 408 | $pending .= wfMsgExt( 'revreview-edited', |
Index: trunk/extensions/CrossNamespaceLinks/CrossNamespaceLinks_body.php |
— | — | @@ -10,7 +10,7 @@ |
11 | 11 | * Constructor |
12 | 12 | */ |
13 | 13 | function CrossNamespaceLinks() { |
14 | | - SpecialPage::SpecialPage( 'CrossNamespaceLinks' ); |
| 14 | + parent::SpecialPage( 'CrossNamespaceLinks' ); |
15 | 15 | } |
16 | 16 | |
17 | 17 | /** |