*/
class ApiImageRotate extends ApiBase {
-
private $mPageSet = null;
public function __construct( $main, $action ) {
*/
private static function addValues( array &$result, $values, $flag = null, $name = null ) {
foreach ( $values as $val ) {
- if( $val instanceof Title ) {
+ if ( $val instanceof Title ) {
$v = array();
ApiQueryBase::addTitleInfo( $v, $val );
- } elseif( $name !== null ) {
+ } elseif ( $name !== null ) {
$v = array( $name => $val );
} else {
$v = $val;
}
- if( $flag !== null ) {
+ if ( $flag !== null ) {
$v[$flag] = '';
}
$result[] = $v;
/**
* Checks that the user has permissions to perform rotations.
- * @param $user User The user to check.
+ * @param User $user The user to check
+ * @param Title $title
* @return string|null Permission error message, or null if there is no error
*/
protected function checkPermissions( $user, $title ) {
public function getParamDescription() {
$pageSet = $this->getPageSet();
- return $pageSet->getParamDescription() + array(
+ return $pageSet->getFinalParamDescription() + array(
'rotation' => 'Degrees to rotate image clockwise',
'token' => 'Edit token. You can get one of these through action=tokens',
);
$pageSet = $this->getPageSet();
return array_merge(
parent::getPossibleErrors(),
- $pageSet->getPossibleErrors()
+ $pageSet->getFinalPossibleErrors()
);
}