Index: trunk/phase3/includes/diff/DifferenceEngine.php |
— | — | @@ -833,18 +833,18 @@ |
834 | 834 | return ''; |
835 | 835 | } |
836 | 836 | |
837 | | - $oldid = $this->mOldRev->getId(); |
838 | | - $newid = $this->mNewRev->getId(); |
839 | | - if ( $oldid > $newid ) { |
840 | | - $tmp = $oldid; $oldid = $newid; $newid = $tmp; |
| 837 | + if ( $this->mOldRev->getTimestamp() > $this->mNewRev->getTimestamp() ) { |
| 838 | + $oldRev = $this->mNewRev; // flip |
| 839 | + $newRev = $this->mOldRev; // flip |
| 840 | + } else { // normal case |
| 841 | + $oldRev = $this->mOldRev; |
| 842 | + $newRev = $this->mNewRev; |
841 | 843 | } |
842 | 844 | |
843 | | - $nEdits = $this->mTitle->countRevisionsBetween( $oldid, $newid ); |
| 845 | + $nEdits = $this->mTitle->countRevisionsBetween( $oldRev, $newRev ); |
844 | 846 | if ( $nEdits > 0 ) { |
845 | | - $limit = 100; |
846 | | - // We use ($limit + 1) so we can detect if there are > 100 authors |
847 | | - // in a given revision range. In that case, diff-multi-manyusers is used. |
848 | | - $numUsers = $this->mTitle->countAuthorsBetween( $oldid, $newid, $limit ); |
| 847 | + $limit = 100; // use diff-multi-manyusers if too many users |
| 848 | + $numUsers = $this->mTitle->countAuthorsBetween( $oldRev, $newRev, $limit ); |
849 | 849 | return self::intermediateEditsMsg( $nEdits, $numUsers, $limit ); |
850 | 850 | } |
851 | 851 | return ''; // nothing |
Index: trunk/extensions/FlaggedRevs/presentation/FlaggedArticleView.php |
— | — | @@ -1368,7 +1368,7 @@ |
1369 | 1369 | { |
1370 | 1370 | $title = $this->article->getTitle(); // convenience |
1371 | 1371 | // @TODO: make diff class cache this |
1372 | | - $n = $title->countRevisionsBetween( $oldRev->getId(), $newRev->getId() ); |
| 1372 | + $n = $title->countRevisionsBetween( $oldRev, $newRev ); |
1373 | 1373 | if ( $n ) { |
1374 | 1374 | $msg = 'revreview-update-edited-prev'; // previous pending edits |
1375 | 1375 | } else { |