Fixup r63301 as per Roan comment
authorSam Reed <reedy@users.mediawiki.org>
Sat, 6 Mar 2010 18:03:05 +0000 (18:03 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Sat, 6 Mar 2010 18:03:05 +0000 (18:03 +0000)
Still not using an index...

includes/api/ApiQueryLogEvents.php

index 9df96a2..da388dc 100644 (file)
@@ -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'] );