From: Sam Reed Date: Sat, 6 Mar 2010 18:03:05 +0000 (+0000) Subject: Fixup r63301 as per Roan comment X-Git-Tag: 1.31.0-rc.0~37536 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_aide%28?a=commitdiff_plain;h=8328c6d61906464b99780825fea34b7168ca2bbb;p=lhc%2Fweb%2Fwiklou.git Fixup r63301 as per Roan comment Still not using an index... --- 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'] );