From: Roan Kattouw Date: Wed, 25 Feb 2009 14:42:31 +0000 (+0000) Subject: Slight fix for r47781: remove useless if($index) conditional: $index is always set... X-Git-Tag: 1.31.0-rc.0~42681 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=1ca568692f1b65205ac3f3b07747fa9b103353e6;p=lhc%2Fweb%2Fwiklou.git Slight fix for r47781: remove useless if($index) conditional: $index is always set and non-false --- 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');