From: Alexandre Emsenhuber Date: Tue, 19 Apr 2011 06:21:06 +0000 (+0000) Subject: * Changed wfMsgNoDBForContent() call to wfMessage(); also switched to user's language... X-Git-Tag: 1.31.0-rc.0~30713 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/recherche.php?a=commitdiff_plain;h=e7660a865448f1b0bc5fee0e1a5319864f76ea78;p=lhc%2Fweb%2Fwiklou.git * Changed wfMsgNoDBForContent() call to wfMessage(); also switched to user's language, I don't see any reason to not display this in user's language * Marked wfMsgNoDBForContent() as deprecated and added wfDeprecated() call; the call in LoadBalancer was the only one in core and extensions * Also added call to wfDeprecated() in wfMsgWeirdKey(); no call in core or extensions --- diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index ff596621ed..4ba0c7c891 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -590,8 +590,11 @@ function wfMsgNoDB( $key ) { /** * Get a message from the language file, for the content + * + * @deprecated in 1.18; use wfMessage() */ function wfMsgNoDBForContent( $key ) { + wfDeprecated( __FUNCTION__ ); global $wgForceUIMsgAsContentMsg; $args = func_get_args(); array_shift( $args ); @@ -629,6 +632,7 @@ function wfMsgReal( $key, $args, $useDB = true, $forContent = false, $transform * @param $key String */ function wfMsgWeirdKey( $key ) { + wfDeprecated( __FUNCTION__ ); $source = wfMsgGetKey( $key, false, true, false ); if ( wfEmptyMsg( $key ) ) { return ''; diff --git a/includes/db/LoadBalancer.php b/includes/db/LoadBalancer.php index 42b4aa690a..0f039a0bb7 100644 --- a/includes/db/LoadBalancer.php +++ b/includes/db/LoadBalancer.php @@ -221,7 +221,7 @@ class LoadBalancer { $i = $this->getRandomNonLagged( $currentLoads, $wiki ); if ( $i === false && count( $currentLoads ) != 0 ) { # All slaves lagged. Switch to read-only mode - $wgReadOnly = wfMsgNoDBForContent( 'readonly_lag' ); + $wgReadOnly = wfMessage( 'readonly_lag' )->useDatabase( false )->plain(); $i = $this->pickRandom( $currentLoads ); $laggedSlaveMode = true; }