Merge "Add wfDeprecated to wfMsg* methods from 1.21 on"
authorNikerabbit <niklas.laxstrom@gmail.com>
Wed, 5 Dec 2012 13:37:45 +0000 (13:37 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 5 Dec 2012 13:37:45 +0000 (13:37 +0000)
RELEASE-NOTES-1.21
includes/GlobalFunctions.php

index af7264a..220089d 100644 (file)
@@ -53,6 +53,10 @@ production.
 * Added EditPage::showStandardInputs:options hook to allow extensions to add
   new fields to the "editOptions" area of the edit form.
 * Upload stash DB schema altered to improve upload performance.
+* The following global functions are now reporting deprecated warnings in
+  debug mode: wfMsg, wfMsgNoTrans, wfMsgForContent, wfMsgForContentNoTrans,
+  wfMsgReal, wfMsgGetKey, wfMsgHtml, wfMsgWikiHtml, wfMsgExt, wfEmptyMsg. Use
+  the Message class, or the global method wfMessage.
 
 === Bug fixes in 1.21 ===
 * (bug 40353) SpecialDoubleRedirect should support interwiki redirects.
index b6cabda..6d86a50 100644 (file)
@@ -1427,6 +1427,8 @@ function wfMessageFallback( /*...*/ ) {
  * @return String
  */
 function wfMsg( $key ) {
+       wfDeprecated( __METHOD__, '1.21' );
+
        $args = func_get_args();
        array_shift( $args );
        return wfMsgReal( $key, $args );
@@ -1441,6 +1443,8 @@ function wfMsg( $key ) {
  * @return String
  */
 function wfMsgNoTrans( $key ) {
+       wfDeprecated( __METHOD__, '1.21' );
+
        $args = func_get_args();
        array_shift( $args );
        return wfMsgReal( $key, $args, true, false, false );
@@ -1472,6 +1476,8 @@ function wfMsgNoTrans( $key ) {
  * @return String
  */
 function wfMsgForContent( $key ) {
+       wfDeprecated( __METHOD__, '1.21' );
+
        global $wgForceUIMsgAsContentMsg;
        $args = func_get_args();
        array_shift( $args );
@@ -1493,6 +1499,8 @@ function wfMsgForContent( $key ) {
  * @return String
  */
 function wfMsgForContentNoTrans( $key ) {
+       wfDeprecated( __METHOD__, '1.21' );
+
        global $wgForceUIMsgAsContentMsg;
        $args = func_get_args();
        array_shift( $args );
@@ -1518,6 +1526,8 @@ function wfMsgForContentNoTrans( $key ) {
  * @return String: the requested message.
  */
 function wfMsgReal( $key, $args, $useDB = true, $forContent = false, $transform = true ) {
+       wfDeprecated( __METHOD__, '1.21' );
+
        wfProfileIn( __METHOD__ );
        $message = wfMsgGetKey( $key, $useDB, $forContent, $transform );
        $message = wfMsgReplaceArgs( $message, $args );
@@ -1538,6 +1548,8 @@ function wfMsgReal( $key, $args, $useDB = true, $forContent = false, $transform
  * @return string
  */
 function wfMsgGetKey( $key, $useDB = true, $langCode = false, $transform = true ) {
+       wfDeprecated( __METHOD__, '1.21' );
+
        wfRunHooks( 'NormalizeMessageKey', array( &$key, &$useDB, &$langCode, &$transform ) );
 
        $cache = MessageCache::singleton();
@@ -1592,6 +1604,8 @@ function wfMsgReplaceArgs( $message, $args ) {
  * @return string
  */
 function wfMsgHtml( $key ) {
+       wfDeprecated( __METHOD__, '1.21' );
+
        $args = func_get_args();
        array_shift( $args );
        return wfMsgReplaceArgs( htmlspecialchars( wfMsgGetKey( $key ) ), $args );
@@ -1611,6 +1625,8 @@ function wfMsgHtml( $key ) {
  * @return string
  */
 function wfMsgWikiHtml( $key ) {
+       wfDeprecated( __METHOD__, '1.21' );
+
        $args = func_get_args();
        array_shift( $args );
        return wfMsgReplaceArgs(
@@ -1642,6 +1658,8 @@ function wfMsgWikiHtml( $key ) {
  * @return String
  */
 function wfMsgExt( $key, $options ) {
+       wfDeprecated( __METHOD__, '1.21' );
+
        $args = func_get_args();
        array_shift( $args );
        array_shift( $args );
@@ -1722,6 +1740,8 @@ function wfMsgExt( $key, $options ) {
  * @return Boolean True if the message *doesn't* exist.
  */
 function wfEmptyMsg( $key ) {
+       wfDeprecated( __METHOD__, '1.21' );
+
        return MessageCache::singleton()->get( $key, /*useDB*/true, /*content*/false ) === false;
 }