From 26a10e5dae409703046007cef3e6f3b52c2ce637 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Tue, 7 Sep 2010 11:34:34 +0000 Subject: [PATCH] Comment fix --- includes/db/DatabaseType.php | 8 +------- includes/diff/DifferenceInterface.php | 19 +++++++++++++++---- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/includes/db/DatabaseType.php b/includes/db/DatabaseType.php index d0154241c5..d4d145fc0b 100644 --- a/includes/db/DatabaseType.php +++ b/includes/db/DatabaseType.php @@ -1,15 +1,9 @@ mTitle->countRevisionsBetween( $oldid, $newid ); - if ( !$n ) - return ''; - - return wfMsgExt( 'diff-multi', array( 'parseinline' ), $n ); + if ( !$n ) { + return ''; + } else { + global $wgLang; + $dbr = wfGetDB( DB_SLAVE ); + $res = $dbr->select( 'revision', 'DISTINCT rev_user_text', + array( + 'rev_page = ' . $this->mOldRev->getPage(), + 'rev_id > ' . $this->mOldRev->getId(), + 'rev_id < ' . $this->mNewRev->getId() + ), __METHOD__, array( 'LIMIT' => 1 ) + ); + return wfMsgExt( 'diff-multi', array( 'parseinline' ), $wgLang->formatNum( $n ), + $wgLang->formatNum( $dbr->numRows( $res ) ) ); + } } -- 2.20.1