From 39ad19a6718d682e2d75b46355ba8b3ef2fe19a2 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Tue, 29 Sep 2015 10:31:55 -0700 Subject: [PATCH] Removed $options from RecentChange::newFromConds * The FORCE INDEX statements are not needed Change-Id: Ia6f386140e88ad01fc35a10b00dbcb0d1eb934ea --- includes/changes/RecentChange.php | 5 ++--- includes/diff/DifferenceEngine.php | 3 +-- includes/page/Article.php | 3 +-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/includes/changes/RecentChange.php b/includes/changes/RecentChange.php index 5c884a5e91..60c9182ba0 100644 --- a/includes/changes/RecentChange.php +++ b/includes/changes/RecentChange.php @@ -171,12 +171,11 @@ class RecentChange { * * @param array $conds Array of conditions * @param mixed $fname Override the method name in profiling/logs - * @param array $options Query options * @return RecentChange|null */ - public static function newFromConds( $conds, $fname = __METHOD__, $options = array() ) { + public static function newFromConds( $conds, $fname = __METHOD__ ) { $dbr = wfGetDB( DB_SLAVE ); - $row = $dbr->selectRow( 'recentchanges', self::selectFields(), $conds, $fname, $options ); + $row = $dbr->selectRow( 'recentchanges', self::selectFields(), $conds, $fname ); if ( $row !== false ) { return self::newFromRow( $row ); } else { diff --git a/includes/diff/DifferenceEngine.php b/includes/diff/DifferenceEngine.php index c138eec2e2..654407862e 100644 --- a/includes/diff/DifferenceEngine.php +++ b/includes/diff/DifferenceEngine.php @@ -487,8 +487,7 @@ class DifferenceEngine extends ContextSource { 'rc_this_oldid' => $this->mNewid, 'rc_patrolled' => 0 ), - __METHOD__, - array( 'USE INDEX' => 'rc_timestamp' ) + __METHOD__ ); if ( $change && !$change->getPerformer()->equals( $user ) ) { diff --git a/includes/page/Article.php b/includes/page/Article.php index defd029a25..4fdaea12ed 100644 --- a/includes/page/Article.php +++ b/includes/page/Article.php @@ -1124,8 +1124,7 @@ class Article implements Page { 'rc_namespace' => $this->getTitle()->getNamespace(), 'rc_cur_id' => $this->getTitle()->getArticleID() ), - __METHOD__, - array( 'USE INDEX' => 'new_name_timestamp' ) + __METHOD__ ); } else { // Cache the information we gathered above in case we can't patrol -- 2.20.1