*
* Created on Jun 30, 2007
*
- * Copyright © 2007 Roan Kattouw <Firstname>.<Lastname>@gmail.com
+ * Copyright © 2007 Roan Kattouw "<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
}
$titleObj = $pageObj->getTitle();
- $reason = ( isset( $params['reason'] ) ? $params['reason'] : null );
+ $reason = $params['reason'];
$user = $this->getUser();
if ( $titleObj->getNamespace() == NS_FILE ) {
}
if ( !$status->isGood() ) {
- $errors = $this->getErrorsArray();
+ $errors = $status->getErrorsArray();
$this->dieUsageMsg( $errors[0] ); // We don't care about multiple errors, just report one of them
}
'pageid' => array(
ApiBase::PARAM_TYPE => 'integer'
),
- 'token' => null,
+ 'token' => array(
+ ApiBase::PARAM_TYPE => 'string',
+ ApiBase::PARAM_REQUIRED => true
+ ),
'reason' => null,
'watch' => array(
ApiBase::PARAM_DFLT => false,
return array(
'' => array(
'title' => 'string',
- 'reason' => 'string'
+ 'reason' => 'string',
+ 'logid' => 'integer'
)
);
}
*
* 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
$this->addFieldsIf( 'page_latest', $this->fld_flags );
// $this->addFieldsIf( 'rev_text_id', $this->fld_ids ); // Should this field be exposed?
$this->addFieldsIf( 'rev_comment', $this->fld_comment || $this->fld_parsedcomment );
- $this->addFieldsIf( 'rev_len', $this->fld_size );
+ $this->addFieldsIf( 'rev_len', $this->fld_size || $this->fld_sizediff );
$this->addFieldsIf( 'rev_minor_edit', $this->fld_flags );
$this->addFieldsIf( 'rev_parent_id', $this->fld_flags || $this->fld_sizediff );
$this->addFieldsIf( 'rc_patrolled', $this->fld_patrolled );
ApiBase::PROP_TYPE => 'integer',
ApiBase::PROP_NULLABLE => true
)
+ ),
+ 'sizediff' => array(
+ 'sizediff' => array(
+ ApiBase::PROP_TYPE => 'integer',
+ ApiBase::PROP_NULLABLE => true
+ )
)
);
}