r69954 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:< r69953‎ | r69954 | r69955 >
Date:18:30, 26 July 2010
Author:reedy
Status:ok
Tags:
Comment:
Partial revert of r69941 - Remove accidentally commited code to CodeReview
Modified paths:
  • /trunk/extensions/CodeReview/backend/CodeRepository.php (modified) (history)
  • /trunk/extensions/CodeReview/ui/CodeAuthorListView.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/backend/CodeRepository.php
——@@ -126,32 +126,7 @@
127127 $wgMemc->set( $key, $authors, 3600 * 24 );
128128 return $authors;
129129 }
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 - );
145130
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 -
156131 public function getTagList() {
157132 global $wgMemc;
158133 $key = wfMemcKey( 'codereview', 'tags', $this->getId() );
——@@ -192,9 +167,8 @@
193168 ),
194169 __METHOD__
195170 );
196 - if ( !$row ) {
 171+ if ( !$row )
197172 throw new MWException( 'Failed to load expected revision data' );
198 - }
199173 return CodeRevision::newFromRow( $this, $row );
200174 }
201175
Index: trunk/extensions/CodeReview/ui/CodeAuthorListView.php
——@@ -12,7 +12,7 @@
1313 $authors = $this->mRepo->getAuthorList();
1414 $repo = $this->mRepo->getName();
1515 $text = wfMsg( 'code-authors-text' ) . "\n\n";
16 - $text .= '<strong>' . wfMsg( 'code-author-total', $wgLang->formatNum( $this->mRepo->getAuthorCount() ) ) . "</strong>\n";
 16+ $text .= '<strong>' . wfMsg( 'code-author-total', $wgLang->formatNum( count( $authors ) ) ) . "</strong>\n";
1717 foreach ( $authors as $committer ) {
1818 if ( $committer ) {
1919 $text .= "* [[Special:Code/$repo/author/$committer|$committer]]";

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r69941More wrong static method calls fixedreedy13:30, 26 July 2010

Status & tagging log