public function getAllowedParams() {
return array(
- 'title' => null,
- 'user' => null,
+ 'title' => array(
+ ApiBase::PARAM_TYPE => 'string',
+ ApiBase::PARAM_REQUIRED => 1
+ ),
+ 'user' => array(
+ ApiBase::PARAM_TYPE => 'string',
+ ApiBase::PARAM_REQUIRED => 1
+ ),
'token' => null,
'summary' => null,
'markbot' => false,
$params = $this->extractRequestParams();
- if ( !isset( $params['user'] ) ) {
- $this->dieUsageMsg( array( 'missingparam', 'user' ) );
- }
-
// We need to be able to revert IPs, but getCanonicalName rejects them
$this->mUser = User::isIP( $params['user'] )
? $params['user']
}
$params = $this->extractRequestParams();
- if ( !isset( $params['title'] ) ) {
- $this->dieUsageMsg( array( 'missingparam', 'title' ) );
- }
$this->mTitleObj = Title::newFromText( $params['title'] );