r72527 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72526‎ | r72527 | r72528 >
Date:11:34, 7 September 2010
Author:demon
Status:ok
Tags:
Comment:
Comment fix
Modified paths:
  • /trunk/phase3/includes/db/DatabaseType.php (modified) (history)
  • /trunk/phase3/includes/diff/DifferenceInterface.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/diff/DifferenceInterface.php
@@ -812,10 +812,21 @@
813813 }
814814
815815 $n = $this->mTitle->countRevisionsBetween( $oldid, $newid );
816 - if ( !$n )
817 - return '';
818 -
819 - return wfMsgExt( 'diff-multi', array( 'parseinline' ), $n );
 816+ if ( !$n ) {
 817+ return '';
 818+ } else {
 819+ global $wgLang;
 820+ $dbr = wfGetDB( DB_SLAVE );
 821+ $res = $dbr->select( 'revision', 'DISTINCT rev_user_text',
 822+ array(
 823+ 'rev_page = ' . $this->mOldRev->getPage(),
 824+ 'rev_id > ' . $this->mOldRev->getId(),
 825+ 'rev_id < ' . $this->mNewRev->getId()
 826+ ), __METHOD__, array( 'LIMIT' => 1 )
 827+ );
 828+ return wfMsgExt( 'diff-multi', array( 'parseinline' ), $wgLang->formatNum( $n ),
 829+ $wgLang->formatNum( $dbr->numRows( $res ) ) );
 830+ }
820831 }
821832
822833
Index: trunk/phase3/includes/db/DatabaseType.php
@@ -1,15 +1,9 @@
22 <?php
33 /**
4 - * Base interface for all DBMS-specific code.
5 - *
6 - * @file
7 - * @ingroup Database
8 - */
9 -
10 -/**
114 * Base interface for all DBMS-specific code. At a bare minimum, all of the
125 * following must be implemented to support MediaWiki
136 *
 7+ * @file
148 * @ingroup Database
159 */
1610 interface DatabaseType {

Follow-up revisions

RevisionCommit summaryAuthorDate
r72529Partial revert r72527, unrelated/unfinished changesdemon11:37, 7 September 2010

Status & tagging log