From 1ca568692f1b65205ac3f3b07747fa9b103353e6 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Wed, 25 Feb 2009 14:42:31 +0000 Subject: [PATCH] Slight fix for r47781: remove useless if($index) conditional: $index is always set and non-false --- includes/api/ApiQueryLogEvents.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/api/ApiQueryLogEvents.php b/includes/api/ApiQueryLogEvents.php index 33c5cb5485..245924c9a5 100644 --- a/includes/api/ApiQueryLogEvents.php +++ b/includes/api/ApiQueryLogEvents.php @@ -115,9 +115,9 @@ class ApiQueryLogEvents extends ApiQueryBase { // Use the title index in preference to the user index if there is a conflict $index = is_null($user) ? 'page_time' : array('page_time','user_time'); } - if ( $index ) { - $this->addOption( 'USE INDEX', array( 'logging' => $index ) ); - } + + $this->addOption( 'USE INDEX', array( 'logging' => $index ) ); + // Paranoia: avoid brute force searches (bug 17342) if (!is_null($title)) { $this->addWhere('log_deleted & ' . LogPage::DELETED_ACTION . ' = 0'); -- 2.20.1