$this->dieUsageMsg( $status[0] );
}
if ( !$status->isGood() ) {
- $errors = $status->getErrorsArray();
- $this->dieUsageMsg( $errors[0] ); // We don't care about multiple errors, just report one of them
+ $this->dieStatus( $status );
}
// Deprecated parameters
*
* @param $page Page|WikiPage object to work on
* @param $user User doing the action
- * @param $token String delete token (same as edit token)
- * @param $reason String|null reason for the deletion. Autogenerated if NULL
+ * @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 ) {
}
$error = '';
+
// Luckily, Article.php provides a reusable delete function that does the hard work for us
return $page->doDeleteArticleReal( $reason, false, 0, true, $error );
}
if ( is_null( $reason ) ) { // Log and RC don't like null reasons
$reason = '';
}
+
return FileDeleteForm::doDelete( $title, $file, $oldimage, $reason, $suppress, $user );
}
public function getParamDescription() {
$p = $this->getModulePrefix();
+
return array(
'title' => "Title of the page you want to delete. Cannot be used together with {$p}pageid",
'pageid' => "Page ID of the page you want to delete. Cannot be used together with {$p}title",