Index: trunk/extensions/CodeReview/backend/CodeRepository.php |
— | — | @@ -128,28 +128,7 @@ |
129 | 129 | } |
130 | 130 | |
131 | 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 | | - ); |
145 | | - |
146 | | - if ( !$row ) { |
147 | | - throw new MWException( 'Failed to load expected author count' ); |
148 | | - } |
149 | | - |
150 | | - $authorsCount = intval( $row->author_count ); |
151 | | - |
152 | | - $wgMemc->set( $key, $authorsCount, 3600 * 24 ); |
153 | | - return $authorsCount; |
| 132 | + return count( $this->getAuthorList() ); |
154 | 133 | } |
155 | 134 | |
156 | 135 | public function getTagList() { |