From: Marius Hoch Date: Sun, 4 Jan 2015 05:34:06 +0000 (+0100) Subject: Make use of DatabaseBase::selectRowCount in Title X-Git-Tag: 1.31.0-rc.0~12809 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=28f9d1c5464176f9e80cfb8f126c86c29a4f17a9;p=lhc%2Fweb%2Fwiklou.git Make use of DatabaseBase::selectRowCount in Title Change-Id: I686f4f785ffa6323ac94b679794ba50539d951f0 --- diff --git a/includes/Title.php b/includes/Title.php index d0c8b3b869..24f4331fa8 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -4046,7 +4046,7 @@ class Title { if ( $this->mIsBigDeletion === null ) { $dbr = wfGetDB( DB_SLAVE ); - $innerQuery = $dbr->selectSQLText( + $revCount = $dbr->selectRowCount( 'revision', '1', array( 'rev_page' => $this->getArticleID() ), @@ -4054,13 +4054,6 @@ class Title { array( 'LIMIT' => $wgDeleteRevisionsLimit + 1 ) ); - $revCount = $dbr->query( - 'SELECT COUNT(*) FROM (' . $innerQuery . ') AS innerQuery', - __METHOD__ - ); - $revCount = $revCount->fetchRow(); - $revCount = $revCount['COUNT(*)']; - $this->mIsBigDeletion = $revCount > $wgDeleteRevisionsLimit; }