X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fskins%2FMediaWikiI18N.php;h=731897e4c5895a22786d5decd5e8ae1d5144db83;hp=02e8391ccde914673b185feaf36fdba84ce4b614;hb=a2c8c2969420a0f150c03f76e3a0bf9028fcda43;hpb=f43fa6f4f0e2cb60b8543daad661b48a3e0653a9 diff --git a/includes/skins/MediaWikiI18N.php b/includes/skins/MediaWikiI18N.php index 02e8391ccd..731897e4c5 100644 --- a/includes/skins/MediaWikiI18N.php +++ b/includes/skins/MediaWikiI18N.php @@ -28,12 +28,20 @@ class MediaWikiI18N { private $context = []; + /** + * @deprecate since 1.31 Use BaseTemplate::msg() or Skin::msg() instead for setting + * message parameters. + */ function set( $varName, $value ) { + wfDeprecated( __METHOD__, '1.31' ); $this->context[$varName] = $value; } + /** + * @deprecate since 1.31 Use BaseTemplate::msg(), Skin::msg(), or wfMessage() instead. + */ function translate( $value ) { - + wfDeprecated( __METHOD__, '1.31' ); // Hack for i18n:attributes in PHPTAL 1.0.0 dev version as of 2004-10-23 $value = preg_replace( '/^string:/', '', $value ); @@ -42,9 +50,9 @@ class MediaWikiI18N { $m = []; while ( preg_match( '/\$([0-9]*?)/sm', $value, $m ) ) { list( $src, $var ) = $m; - MediaWiki\suppressWarnings(); + Wikimedia\suppressWarnings(); $varValue = $this->context[$var]; - MediaWiki\restoreWarnings(); + Wikimedia\restoreWarnings(); $value = str_replace( $src, $varValue, $value ); } return $value;