r72897 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72896‎ | r72897 | r72898 >
Date:14:21, 13 September 2010
Author:demon
Status:ok (Comments)
Tags:
Comment:
Followup r72866, make 100 in 100+ a param. Makes raising the limit easier :)
Modified paths:
  • /trunk/phase3/includes/diff/DifferenceInterface.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/diff/DifferenceInterface.php
@@ -817,16 +817,26 @@
818818 } else {
819819 global $wgLang;
820820 $dbr = wfGetDB( DB_SLAVE );
 821+
 822+ // Actually, the limit is $limit + 1. We do this so we can detect
 823+ // if there are > 100 authors in a given revision range. If they
 824+ // are, $limit will be passed to diff-multi-manyusers for l10n.
 825+ $limit = 100;
821826 $res = $dbr->select( 'revision', 'DISTINCT rev_user_text',
822827 array(
823828 'rev_page = ' . $this->mOldRev->getPage(),
824829 'rev_id > ' . $this->mOldRev->getId(),
825830 'rev_id < ' . $this->mNewRev->getId()
826831 ), __METHOD__,
827 - array( 'LIMIT' => 101 )
 832+ array( 'LIMIT' => $limit + 1 )
828833 );
829834 $numUsers = $dbr->numRows( $res );
830 - $msg = $numUsers > 100 ? 'diff-multi-manyusers' : 'diff-multi';
 835+ if( $numUsers > $limit ) {
 836+ $msg = 'diff-multi-manyusers';
 837+ $numUsers = $limit;
 838+ } else {
 839+ $msg = 'diff-multi';
 840+ }
831841 return wfMsgExt( $msg, array( 'parseinline' ), $wgLang->formatnum( $n ),
832842 $wgLang->formatnum( $numUsers ) );
833843 }
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -1618,7 +1618,7 @@
16191619 'showhideselectedversions' => 'Show/hide selected revisions',
16201620 'editundo' => 'undo',
16211621 'diff-multi' => '({{PLURAL:$1|One intermediate revision|$1 intermediate revisions}} by {{PLURAL:$2|one user|$2 users}} not shown)',
1622 -'diff-multi-manyusers' => '($1 intermediate revisions by 100+ users not shown)',
 1622+'diff-multi-manyusers' => '($1 intermediate revisions by $2+ users not shown)',
16231623
16241624 # Search results
16251625 'search-summary' => '', # do not translate or duplicate this message to other languages

Follow-up revisions

RevisionCommit summaryAuthorDate
r72902Followup r72897, tweak wording, again. Can't you tell I'm not good at this so...demon14:58, 13 September 2010
r72908Follow-up r72897: use PLURALraymond15:22, 13 September 2010
r72909Follow-up r72897: use PLURAL tooraymond15:31, 13 September 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r72866(bug 24007) Diff pages now mention the number of users having edited intermed...demon15:39, 12 September 2010

Comments

#Comment by Nikerabbit (talk | contribs)   14:46, 13 September 2010

I still think that the + should be expressed with words.

Status & tagging log