class ApiImageRotate extends ApiBase {
private $mPageSet = null;
- public function __construct( $main, $action ) {
- parent::__construct( $main, $action );
- }
-
/**
* Add all items from $values into the result
* @param array $result output
if ( $this->mPageSet === null ) {
$this->mPageSet = new ApiPageSet( $this, 0, NS_FILE );
}
+
return $this->mPageSet;
}
if ( $permissionErrors ) {
// Just return the first error
$msg = $this->parseMsg( $permissionErrors[0] );
+
return $msg['info'];
}
if ( $flags ) {
$result += $this->getPageSet()->getFinalParams( $flags );
}
+
return $result;
}
public function getParamDescription() {
$pageSet = $this->getPageSet();
+
return $pageSet->getFinalParamDescription() + array(
'rotation' => 'Degrees to rotate image clockwise',
'token' => 'Edit token. You can get one of these through action=tokens',
}
public function getDescription() {
- return 'Rotate one or more images';
+ return 'Rotate one or more images.';
}
public function needsToken() {
public function getPossibleErrors() {
$pageSet = $this->getPageSet();
+
return array_merge(
parent::getPossibleErrors(),
$pageSet->getFinalPossibleErrors()