From 5b1ecf951f8dbaf4ae13d1ec0e683dda6ea72a5d Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sun, 24 Apr 2011 16:53:46 +0000 Subject: [PATCH] * Use wfMsgNoTrans() instead of wfMsgReal() * Simplify getPageTitle() * Remove a useless call to getPageTitle(), tag does not have content --- includes/Exception.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/includes/Exception.php b/includes/Exception.php index 0e0719445c..67ad329088 100644 --- a/includes/Exception.php +++ b/includes/Exception.php @@ -88,7 +88,7 @@ class MWException extends Exception { $args = array_slice( func_get_args(), 2 ); if ( $this->useMessageCache() ) { - return wfMsgReal( $key, $args ); + return wfMsgNoTrans( $key, $args ); } else { return wfMsgReplaceArgs( $fallback, $args ); } @@ -133,13 +133,8 @@ class MWException extends Exception { /* Return titles of this error page */ function getPageTitle() { - if ( $this->useMessageCache() ) { - return wfMsg( 'internalerror' ); - } else { - global $wgSitename; - - return "$wgSitename error"; - } + global $wgSitename; + return $this->msg( 'internalerror', "$wgSitename error" ); } /** @@ -265,7 +260,7 @@ ENDL $header = Html::element( 'img', array( 'src' => $wgLogo, - 'alt' => '' ), $this->getPageTitle() ); + 'alt' => '' ) ); $attribs = array( 'dir' => $dir, 'lang' => $code ); -- 2.20.1