*
* Created on Oct 16, 2006
*
- * Copyright © 2006 Yuri Astrakhan <Firstname><Lastname>@gmail.com
+ * Copyright © 2006 Yuri Astrakhan "<Firstname><Lastname>@gmail.com"
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* @param $type string
* @param $action string
* @param $ts
+ * @param $legacy bool
* @return array
*/
public static function addLogParams( $result, &$vals, $params, $type, $action, $ts, $legacy = false ) {
}
public function getAllowedParams() {
- global $wgLogTypes, $wgLogActions;
+ global $wgLogTypes, $wgLogActions, $wgLogActionsHandlers;
return array(
'prop' => array(
ApiBase::PARAM_ISMULTI => true,
ApiBase::PARAM_TYPE => $wgLogTypes
),
'action' => array(
- ApiBase::PARAM_TYPE => array_keys( $wgLogActions )
+ ApiBase::PARAM_TYPE => array_keys( array_merge( $wgLogActions, $wgLogActionsHandlers ) )
),
'start' => array(
ApiBase::PARAM_TYPE => 'timestamp'
);
}
+ public function getResultProperties() {
+ global $wgLogTypes;
+ return array(
+ 'ids' => array(
+ 'logid' => 'integer',
+ 'pageid' => 'integer'
+ ),
+ 'title' => array(
+ 'ns' => 'namespace',
+ 'title' => 'string'
+ ),
+ 'type' => array(
+ 'type' => array(
+ ApiBase::PROP_TYPE => $wgLogTypes
+ ),
+ 'action' => 'string'
+ ),
+ 'details' => array(
+ 'actionhidden' => 'boolean'
+ ),
+ 'user' => array(
+ 'userhidden' => 'boolean',
+ 'user' => array(
+ ApiBase::PROP_TYPE => 'string',
+ ApiBase::PROP_NULLABLE => true
+ ),
+ 'anon' => 'boolean'
+ ),
+ 'userid' => array(
+ 'userhidden' => 'boolean',
+ 'userid' => array(
+ ApiBase::PROP_TYPE => 'integer',
+ ApiBase::PROP_NULLABLE => true
+ ),
+ 'anon' => 'boolean'
+ ),
+ 'timestamp' => array(
+ 'timestamp' => 'timestamp'
+ ),
+ 'comment' => array(
+ 'commenthidden' => 'boolean',
+ 'comment' => array(
+ ApiBase::PROP_TYPE => 'string',
+ ApiBase::PROP_NULLABLE => true
+ )
+ ),
+ 'parsedcomment' => array(
+ 'commenthidden' => 'boolean',
+ 'parsedcomment' => array(
+ ApiBase::PROP_TYPE => 'string',
+ ApiBase::PROP_NULLABLE => true
+ )
+ )
+ );
+ }
+
public function getDescription() {
return 'Get events from logs';
}