From: Roan Kattouw Date: Sun, 12 Dec 2010 16:18:08 +0000 (+0000) Subject: Redo r78254 without the syntax error X-Git-Tag: 1.31.0-rc.0~33358 X-Git-Url: http://git.cyclocoop.org/data/%24oldEdit?a=commitdiff_plain;h=03d31a07fae98ea230113bb85f9d6941e7ee9245;p=lhc%2Fweb%2Fwiklou.git Redo r78254 without the syntax error --- diff --git a/includes/Title.php b/includes/Title.php index 21028ea777..9adc9a8367 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -3748,11 +3748,11 @@ class Title { */ public function countRevisionsBetween( $old, $new ) { $dbr = wfGetDB( DB_SLAVE ); - return (int)$dbr->selectField( 'revision', 'count(*)', - 'rev_page = ' . intval( $this->getArticleId() ) . - ' AND rev_id > ' . intval( $old ) . - ' AND rev_id < ' . intval( $new ), - __METHOD__ + return (int)$dbr->selectField( 'revision', 'count(*)', array( + 'rev_page' => intval( $this->getArticleId() ), + 'rev_id > ' . intval( $old ), + 'rev_id < ' . intval( $new ) + ), __METHOD__ ); } @@ -3770,7 +3770,7 @@ class Title { $db = ( $flags & self::GAID_FOR_UPDATE ) ? wfGetDB( DB_MASTER ) : wfGetDB( DB_SLAVE ); $res = $db->select( 'revision', 'DISTINCT rev_user_text', array( - 'rev_page = ' . $this->getArticleID(), + 'rev_page' => $this->getArticleID(), 'rev_id > ' . (int)$fromRevId, 'rev_id < ' . (int)$toRevId ), __METHOD__,