Merge "mw.Upload.BookletLayout: Don't explode when the API call fails with 'exception'"
[lhc/web/wiklou.git] / includes / api / ApiQueryLogEvents.php
index d87ad1e..a76012a 100644 (file)
@@ -165,7 +165,7 @@ class ApiQueryLogEvents extends ApiQueryBase {
                        if ( $userid ) {
                                $this->addWhereFld( 'log_user', $userid );
                        } else {
-                               $this->addWhereFld( 'log_user_text', IP::sanitizeIP( $user ) );
+                               $this->addWhereFld( 'log_user_text', $user );
                        }
                }
 
@@ -365,7 +365,10 @@ class ApiQueryLogEvents extends ApiQueryBase {
         */
        private function getAllowedLogActions() {
                $config = $this->getConfig();
-               return array_keys( array_merge( $config->get( 'LogActions' ), $config->get( 'LogActionsHandlers' ) ) );
+               return array_keys( array_merge(
+                       $config->get( 'LogActions' ),
+                       $config->get( 'LogActionsHandlers' )
+               ) );
        }
 
        public function getCacheMode( $params ) {
@@ -427,7 +430,9 @@ class ApiQueryLogEvents extends ApiQueryBase {
                                ),
                                ApiBase::PARAM_HELP_MSG => 'api-help-param-direction',
                        ),
-                       'user' => null,
+                       'user' => array(
+                               ApiBase::PARAM_TYPE => 'user',
+                       ),
                        'title' => null,
                        'namespace' => array(
                                ApiBase::PARAM_TYPE => 'namespace'