From c1f9b1f7b1b77776192048005dcc66dcf3df2bfb Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 27 Dec 2014 15:41:37 +0100 Subject: Update to MediaWiki 1.24.1 --- includes/exception/ErrorPageError.php | 61 +++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 includes/exception/ErrorPageError.php (limited to 'includes/exception/ErrorPageError.php') diff --git a/includes/exception/ErrorPageError.php b/includes/exception/ErrorPageError.php new file mode 100644 index 00000000..3631a340 --- /dev/null +++ b/includes/exception/ErrorPageError.php @@ -0,0 +1,61 @@ +title = $title; + $this->msg = $msg; + $this->params = $params; + + // Bug 44111: Messages in the log files should be in English and not + // customized by the local wiki. So get the default English version for + // passing to the parent constructor. Our overridden report() below + // makes sure that the page shown to the user is not forced to English. + if ( $msg instanceof Message ) { + $enMsg = clone( $msg ); + } else { + $enMsg = wfMessage( $msg, $params ); + } + $enMsg->inLanguage( 'en' )->useDatabase( false ); + parent::__construct( $enMsg->text() ); + } + + public function report() { + global $wgOut; + + $wgOut->showErrorPage( $this->title, $this->msg, $this->params ); + $wgOut->output(); + } +} -- cgit v1.2.2