}
/**
- * @param $title Title
- * @param $user User doing the action
- * @param $token String
+ * @param Title $title
+ * @param User $user User doing the action
+ * @param string $token
* @return array
*/
private static function getPermissionsError( $title, $user, $token ) {
/**
* We have our own delete() function, since Article.php's implementation is split in two phases
*
- * @param $page Page|WikiPage object to work on
- * @param $user User doing the action
- * @param string $token delete token (same as edit token)
- * @param string|null $reason reason for the deletion. Autogenerated if NULL
+ * @param Page|WikiPage $page Page or WikiPage object to work on
+ * @param User $user User doing the action
+ * @param string $token Delete token (same as edit token)
+ * @param string|null $reason Reason for the deletion. Autogenerated if null
* @return Status|array
*/
public static function delete( Page $page, User $user, $token, &$reason = null ) {
);
}
- public function getResultProperties() {
- return array(
- '' => array(
- 'title' => 'string',
- 'reason' => 'string',
- 'logid' => 'integer'
- )
- );
- }
-
public function getDescription() {
return 'Delete a page.';
}
- public function getPossibleErrors() {
- return array_merge( parent::getPossibleErrors(),
- $this->getTitleOrPageIdErrorMessage(),
- array(
- array( 'notanarticle' ),
- array( 'hookaborted', 'error' ),
- array( 'delete-toobig', 'limit' ),
- array( 'cannotdelete', 'title' ),
- array( 'invalidoldimage' ),
- array( 'nodeleteablefile' ),
- )
- );
- }
-
public function needsToken() {
return true;
}