MediaWiki
REL1_24
|
00001 <?php 00027 class ErrorPageError extends MWException { 00028 public $title, $msg, $params; 00029 00037 public function __construct( $title, $msg, $params = array() ) { 00038 $this->title = $title; 00039 $this->msg = $msg; 00040 $this->params = $params; 00041 00042 // Bug 44111: Messages in the log files should be in English and not 00043 // customized by the local wiki. So get the default English version for 00044 // passing to the parent constructor. Our overridden report() below 00045 // makes sure that the page shown to the user is not forced to English. 00046 if ( $msg instanceof Message ) { 00047 $enMsg = clone( $msg ); 00048 } else { 00049 $enMsg = wfMessage( $msg, $params ); 00050 } 00051 $enMsg->inLanguage( 'en' )->useDatabase( false ); 00052 parent::__construct( $enMsg->text() ); 00053 } 00054 00055 public function report() { 00056 global $wgOut; 00057 00058 $wgOut->showErrorPage( $this->title, $this->msg, $this->params ); 00059 $wgOut->output(); 00060 } 00061 }