From 8328c6d61906464b99780825fea34b7168ca2bbb Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Sat, 6 Mar 2010 18:03:05 +0000 Subject: [PATCH] Fixup r63301 as per Roan comment Still not using an index... --- includes/api/ApiQueryLogEvents.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/api/ApiQueryLogEvents.php b/includes/api/ApiQueryLogEvents.php index 9df96a2f2f..da388dcaa9 100644 --- a/includes/api/ApiQueryLogEvents.php +++ b/includes/api/ApiQueryLogEvents.php @@ -105,7 +105,9 @@ class ApiQueryLogEvents extends ApiQueryBase { } if ( !is_null( $params['action'] ) ) { - $this->addWhereFld( 'log_action', substr( $params['action'], strrpos( $params['action'], "/" ) + 1 ) ); + list( $type, $action ) = explode( '/', $params['action'] ); + $this->addWhereFld( 'log_type', $type ); + $this->addWhereFld( 'log_action', $action ); } else if ( !is_null( $params['type'] ) ) { $this->addWhereFld( 'log_type', $params['type'] ); -- 2.20.1