r18209 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r18208‎ | r18209 | r18210 >
Date:21:27, 6 December 2006
Author:brion
Status:old
Tags:
Comment:
Fix for new diff revision counter: suppress intermediate revision count when
comparing revisions from different pages
Modified paths:
  • /trunk/phase3/includes/DifferenceEngine.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/DifferenceEngine.php
@@ -439,7 +439,12 @@
440440 function getMultiNotice() {
441441 if ( !is_object($this->mOldRev) || !is_object($this->mNewRev) )
442442 return '';
443 -
 443+
 444+ if( !$this->mOldPage->equals( $this->mNewPage ) ) {
 445+ // Comparing two different pages? Count would be meaningless.
 446+ return '';
 447+ }
 448+
444449 $oldid = $this->mOldRev->getId();
445450 $newid = $this->mNewRev->getId();
446451 if ( $oldid > $newid ) {