From 28f9d1c5464176f9e80cfb8f126c86c29a4f17a9 Mon Sep 17 00:00:00 2001 From: Marius Hoch Date: Sun, 4 Jan 2015 06:34:06 +0100 Subject: [PATCH] Make use of DatabaseBase::selectRowCount in Title Change-Id: I686f4f785ffa6323ac94b679794ba50539d951f0 --- includes/Title.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) 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; } -- 2.20.1