* - timestamp: A timestamp in any format recognized by MWTimestamp, or the
* string 'now' representing the current timestamp. Will be returned in
* TS_MW format.
- * - user: A MediaWiki username. Will be returned normalized but not canonicalized.
+ * - user: A MediaWiki username or IP. Will be returned normalized but not canonicalized.
* - upload: An uploaded file. Will be returned as a WebRequestUpload object.
* Cannot be used with PARAM_ISMULTI.
*/
public function getAllowedParams() {
return array(
'user' => array(
- ApiBase::PARAM_TYPE => 'string',
+ ApiBase::PARAM_TYPE => 'user',
ApiBase::PARAM_REQUIRED => true
),
'expiry' => 'never',
ApiBase::PARAM_ISMULTI => true
),
'users' => array(
+ ApiBase::PARAM_TYPE => 'user',
ApiBase::PARAM_ISMULTI => true
),
'ip' => array(
if ( $userid ) {
$this->addWhereFld( 'log_user', $userid );
} else {
- $this->addWhereFld( 'log_user_text', IP::sanitizeIP( $user ) );
+ $this->addWhereFld( 'log_user_text', $user );
}
}
),
ApiBase::PARAM_HELP_MSG => 'api-help-param-direction',
),
- 'user' => null,
+ 'user' => array(
+ ApiBase::PARAM_TYPE => 'user',
+ ),
'title' => null,
'namespace' => array(
ApiBase::PARAM_TYPE => 'namespace'
ApiBase::PARAM_HELP_MSG => 'api-help-param-continue',
),
'user' => array(
+ ApiBase::PARAM_TYPE => 'user',
ApiBase::PARAM_ISMULTI => true
),
'userprefix' => null,
),
'attachedwiki' => null,
'users' => array(
+ ApiBase::PARAM_TYPE => 'user',
ApiBase::PARAM_ISMULTI => true
),
'token' => array(
ApiBase::PARAM_ISMULTI => true,
),
'user' => array(
- ApiBase::PARAM_TYPE => 'string',
+ ApiBase::PARAM_TYPE => 'user',
ApiBase::PARAM_REQUIRED => true
),
'summary' => '',
public function getAllowedParams() {
return array(
'user' => array(
- ApiBase::PARAM_TYPE => 'string',
+ ApiBase::PARAM_TYPE => 'user',
),
'userid' => array(
ApiBase::PARAM_TYPE => 'integer',