From: Kevin Israel Date: Mon, 26 May 2014 17:40:34 +0000 (-0400) Subject: DBConnectionError: Expand {{SITENAME}} in pagetitle with Message::text() X-Git-Tag: 1.31.0-rc.0~15578^2 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=6949668b3d8e8d2625858f9c001b1b8927fc121b;p=lhc%2Fweb%2Fwiklou.git DBConnectionError: Expand {{SITENAME}} in pagetitle with Message::text() Follows-up 485ff9ead94b by making the same change in DBConnectionError, which overrides MWException::msg() to not use database messages. Bug: 58447 Change-Id: Iafa9dd741f1f099a4a6cfb8cf655b7d5f504011a --- diff --git a/includes/db/DatabaseError.php b/includes/db/DatabaseError.php index 4d5c3dc5e1..8229c99565 100644 --- a/includes/db/DatabaseError.php +++ b/includes/db/DatabaseError.php @@ -133,17 +133,13 @@ class DBConnectionError extends DBExpectedError { * @return string Unprocessed plain error text with parameters replaced */ function msg( $key, $fallback /*[, params...] */ ) { - global $wgLang; - $args = array_slice( func_get_args(), 2 ); if ( $this->useMessageCache() ) { - $message = $wgLang->getMessage( $key ); + return wfMessage( $key, $args )->useDatabase( false )->text(); } else { - $message = $fallback; + return wfMsgReplaceArgs( $fallback, $args ); } - - return wfMsgReplaceArgs( $message, $args ); } /**