This method just should not exist. It does have a bad name that does not
say much about what it does and how it is supposed to be used. And it
does horrible things: it accesses the global $wgOut, which currently
results in test failures, see
https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-php70-docker/15200/console
Note how it was marked as @private, which is honorable, but doesn't
work for multiple reasons. First, an overload exists in the BaseTemplate
subclass. Second, calls from external code exist. Third, if it would be
really private, it could as well be deleted, because there is no private
caller.
Luckily the number of callers is extremely close to zero, see
https://codesearch.wmflabs.org/search/?q=>msgWiki%5C(
A patch for the Collection extension already exists.
Change-Id: I8d2c14f10fbf314735d1aa82bdc8edfb4fa9a0dd
* (T209699) The jquery.async module has been deprecated. JavaScript code that
needs asynchronous behaviour should use Promises.
* Password::equals() is deprecated, use verify().
+* BaseTemplate::msgWiki() and QuickTemplate::msgWiki() will be removed. Use
+ other means to fetch a properly escaped message string or Message object.
=== Other changes in 1.33 ===
* (T208871) The hard-coded Google search form on the database error page was
/**
* @param string $str
* @warning You should never use this method. I18n messages should be escaped
- * @deprecated 1.32 Use ->msg() or ->msgWiki() instead.
+ * @deprecated 1.32 Use ->msg() or ->getMsg() instead.
* @suppress SecurityCheck-XSS
* @return-taint exec_html
*/
echo $this->getMsg( $str )->text();
}
+ /**
+ * @deprecated since 1.33 Use ->msg() or ->getMsg() instead.
+ */
function msgWiki( $str ) {
+ // TODO: Add wfDeprecated( __METHOD__, '1.33' ) after 1.33 got released
echo $this->getMsg( $str )->parseAsBlock();
}
* @private
* @param string $msgKey
* @warning You should never use this method. I18n messages should be escaped
- * @deprecated 1.32 Use ->msg() or ->msgWiki() instead.
+ * @deprecated 1.32 Use ->msg() instead.
* @suppress SecurityCheck-XSS
* @return-taint exec_html
*/
/**
* An ugly, ugly hack.
- * @private
+ * @deprecated since 1.33 Use ->msg() instead.
* @param string $msgKey
*/
function msgWiki( $msgKey ) {
+ // TODO: Add wfDeprecated( __METHOD__, '1.33' ) after 1.33 got released
global $wgOut;
$text = wfMessage( $msgKey )->plain();