r78257 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78256‎ | r78257 | r78258 >
Date:16:18, 12 December 2010
Author:catrope
Status:ok
Tags:
Comment:
Redo r78254 without the syntax error
Modified paths:
  • /trunk/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Title.php
@@ -3748,11 +3748,11 @@
37493749 */
37503750 public function countRevisionsBetween( $old, $new ) {
37513751 $dbr = wfGetDB( DB_SLAVE );
3752 - return (int)$dbr->selectField( 'revision', 'count(*)',
3753 - 'rev_page = ' . intval( $this->getArticleId() ) .
3754 - ' AND rev_id > ' . intval( $old ) .
3755 - ' AND rev_id < ' . intval( $new ),
3756 - __METHOD__
 3752+ return (int)$dbr->selectField( 'revision', 'count(*)', array(
 3753+ 'rev_page' => intval( $this->getArticleId() ),
 3754+ 'rev_id > ' . intval( $old ),
 3755+ 'rev_id < ' . intval( $new )
 3756+ ), __METHOD__
37573757 );
37583758 }
37593759
@@ -3770,7 +3770,7 @@
37713771 $db = ( $flags & self::GAID_FOR_UPDATE ) ? wfGetDB( DB_MASTER ) : wfGetDB( DB_SLAVE );
37723772 $res = $db->select( 'revision', 'DISTINCT rev_user_text',
37733773 array(
3774 - 'rev_page = ' . $this->getArticleID(),
 3774+ 'rev_page' => $this->getArticleID(),
37753775 'rev_id > ' . (int)$fromRevId,
37763776 'rev_id < ' . (int)$toRevId
37773777 ), __METHOD__,

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r78254Folllowup r72866: use array syntax for rev_page = foo conditioncatrope15:55, 12 December 2010

Status & tagging log