* @param array $err Error messages. Each item is an error message.
* It may either be a string message name or array message name and
* parameters, like the second argument to OutputPage::wrapWikiMsg().
+ * @param bool $isPermError Whether the error message is about user permissions.
*/
- function showForm( $err ) {
+ function showForm( $err, $isPermError = false ) {
$this->getSkin()->setRelevantTitle( $this->oldTitle );
$out = $this->getOutput();
}
if ( count( $err ) ) {
- $action_desc = $this->msg( 'action-move' )->plain();
- $errMsgHtml = $this->msg( 'permissionserrorstext-withaction',
- count( $err ), $action_desc )->parseAsBlock();
+ if ( $isPermError ) {
+ $action_desc = $this->msg( 'action-move' )->plain();
+ $errMsgHtml = $this->msg( 'permissionserrorstext-withaction',
+ count( $err ), $action_desc )->parseAsBlock();
+ } else {
+ $errMsgHtml = $this->msg( 'cannotmove', count( $err ) )->parseAsBlock();
+ }
if ( count( $err ) == 1 ) {
$errMsg = $err[0];
$permErrors = $nt->getUserPermissionsErrors( 'delete', $user );
if ( count( $permErrors ) ) {
# Only show the first error
- $this->showForm( $permErrors );
+ $this->showForm( $permErrors, true );
return;
}
$permStatus = $mp->checkPermissions( $user, $this->reason );
if ( !$permStatus->isOK() ) {
- $this->showForm( $permStatus->getErrorsArray() );
+ $this->showForm( $permStatus->getErrorsArray(), true );
return;
}