r78076 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78075‎ | r78076 | r78077 >
Date:17:07, 8 December 2010
Author:demon
Status:reverted (Comments)
Tags:
Comment:
Until someone bothers fixing this inaccurate counting something, return something more useful
Modified paths:
  • /trunk/extensions/CodeReview/ui/CodeRevisionListView.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/ui/CodeRevisionListView.php
@@ -190,7 +190,7 @@
191191 * @return int Number of revisions
192192 */
193193 function getRevCount( $dbr ) {
194 - $tables = array( 'code_rev' );
 194+ /*$tables = array( 'code_rev' );
195195 $selectFields = array( 'COUNT( DISTINCT cr_id ) AS rev_count' );
196196 // Count if code_rev where path matches
197197 if ( strlen( $this->mPath ) ) {
@@ -213,6 +213,8 @@
214214 } else {
215215 return 0;
216216 }
 217+ */
 218+ return mt_rand( 0, $this->mRepo->getLastStoredRev() );
217219 }
218220
219221 /**

Follow-up revisions

RevisionCommit summaryAuthorDate
r79947rv r78076demon18:47, 10 January 2011

Comments

#Comment by Reedy (talk | contribs)   17:09, 8 December 2010
#Comment by Platonides (talk | contribs)   22:51, 8 December 2010

What's the point of this? a return 42; would have been more useful.

#Comment by VasilievVV (talk | contribs)   13:25, 11 December 2010

This is not an appropriate solution.

#Comment by 😂 (talk | contribs)   15:53, 11 December 2010

{{sofixit}}.

#Comment by Platonides (talk | contribs)   21:38, 11 December 2010

Why is it inaccurate?

I assume that number is the one that appears as Total number of results:?

For instance in http://www.mediawiki.org/w/index.php?title=Special:Code/MediaWiki/path&path=%2Ftrunk%2Fphase3%2Fincludes%2Fspecials%2FSpecialUserlogin.php it seems to match the listed entries.

#Comment by 😂 (talk | contribs)   21:44, 11 December 2010

That does, but http://www.mediawiki.org/wiki/Special:Code/MediaWiki/status/fixme?author=platonides doesn't. On some filters (tags, author) it will overreport the number of results.

#Comment by Platonides (talk | contribs)   22:31, 11 December 2010

Heh, I remembered about seeing that, but was later told that it didn't exist, plus I couldn't find it again.

The problem with that count is that it is ignoring the author filter, returning the total number of fixmes.

#Comment by VasilievVV (talk | contribs)   22:39, 11 December 2010

As I said, I'm working on a proper filtering system.

Status & tagging log