r90513 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90512‎ | r90513 | r90514 >
Date:07:43, 21 June 2011
Author:ialex
Status:ok
Tags:
Comment:
* Made $useDB parameter of wfMsgGetKey() optional as in wfMsgReal() and removed it where possible
* Removed it from the call to wfMsgReal() in wfMsg() too
Modified paths:
  • /trunk/phase3/includes/GlobalFunctions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/GlobalFunctions.php
@@ -953,7 +953,7 @@
954954 function wfMsg( $key ) {
955955 $args = func_get_args();
956956 array_shift( $args );
957 - return wfMsgReal( $key, $args, true );
 957+ return wfMsgReal( $key, $args );
958958 }
959959
960960 /**
@@ -1051,7 +1051,7 @@
10521052 * @param $transform Boolean: whether to parse magic words, etc.
10531053 * @return string
10541054 */
1055 -function wfMsgGetKey( $key, $useDB, $langCode = false, $transform = true ) {
 1055+function wfMsgGetKey( $key, $useDB = true, $langCode = false, $transform = true ) {
10561056 wfRunHooks( 'NormalizeMessageKey', array( &$key, &$useDB, &$langCode, &$transform ) );
10571057
10581058 $cache = MessageCache::singleton();
@@ -1106,7 +1106,7 @@
11071107 function wfMsgHtml( $key ) {
11081108 $args = func_get_args();
11091109 array_shift( $args );
1110 - return wfMsgReplaceArgs( htmlspecialchars( wfMsgGetKey( $key, true ) ), $args );
 1110+ return wfMsgReplaceArgs( htmlspecialchars( wfMsgGetKey( $key ) ), $args );
11111111 }
11121112
11131113 /**
@@ -1124,7 +1124,7 @@
11251125 $args = func_get_args();
11261126 array_shift( $args );
11271127 return wfMsgReplaceArgs(
1128 - MessageCache::singleton()->parse( wfMsgGetKey( $key, true ), null, /* can't be set to false */ true )->getText(),
 1128+ MessageCache::singleton()->parse( wfMsgGetKey( $key ), null, /* can't be set to false */ true )->getText(),
11291129 $args );
11301130 }
11311131

Status & tagging log