From: Raimond Spekking Date: Mon, 6 Aug 2007 11:30:40 +0000 (+0000) Subject: * Tweaking Werdnas new functions 'showPermissionsErrorPage' and 'formatPermissionsErr... X-Git-Tag: 1.31.0-rc.0~51858 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/password.php?a=commitdiff_plain;h=877d2bac2f0b;p=lhc%2Fweb%2Fwiklou.git * 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 --- 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 .= '