From 877d2bac2f0b2b2c021d88ab7b4747d4f7fe6a4f Mon Sep 17 00:00:00 2001 From: Raimond Spekking Date: Mon, 6 Aug 2007 11:30:40 +0000 Subject: [PATCH] * Tweaking Werdnas new functions 'showPermissionsErrorPage' and 'formatPermissionsErrorMessage' a bit: ** Removing parameter $title from 'showPermissionsErrorPage', seems unused ** The message 'permissionserrorstext' uses {{PLURAL:}}, so pass the number of errors to the message. ** Show message 'permissionserrorstext' only once. ** Documentation * First use of 'showPermissionsErrorPage' in SpecialMovepage.php * Formatting MessagesEn.php a bit --- includes/OutputPage.php | 11 +++++++---- includes/SpecialMovepage.php | 2 +- languages/messages/MessagesEn.php | 16 +++++++--------- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/includes/OutputPage.php b/includes/OutputPage.php index ee53f93ba6..efa0092350 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -816,7 +816,12 @@ class OutputPage { $this->returnToMain( false ); } - public function showPermissionsErrorPage( $title, $errors ) + /** + * Output a standard permission error page + * + * @param array $errors Error message keys + */ + public function showPermissionsErrorPage( $errors ) { global $wgTitle; @@ -829,8 +834,6 @@ class OutputPage { $this->enableClientCache( false ); $this->mRedirect = ''; $this->mBodytext = ''; - - $this->addWikiText( wfMsg('permissionserrorstext') ); $this->addWikitext( $this->formatPermissionsErrorMessage( $errors ) ); } @@ -956,7 +959,7 @@ class OutputPage { public function formatPermissionsErrorMessage( $errors ) { $text = ''; - $text .= wfMsg('permissionserrorstext')."\n"; + $text .= wfMsgExt( 'permissionserrorstext', array( 'parse' ), count( $errors ) ) . "\n"; $text .= '