QuickTemplate::msgHtml() (And the weird override that does the
same thing a different way - BaseTemplate::msgHtml()) are inherently
unsafe as they echo out a raw html message. This is strongly
discouraged in modern code. According to codeSearch tool, nothing
uses these methods, and there is a "@private" annotation on the
QuickTemplate::msgHtml() docblock. Thus hard deprecating it.
Change-Id: I4e9e157e922a36787adef4d0bf7608605c27f0c4
Remove all usage of $tpl->translator->translate() with wfMessage()->text(),
which does the same thing, given the deprecated $tpl->translator->set()
and $tpl->setTranslator() methods have no callers.
These new wfMessage() callers should probably be changed to context calls
via BaseTemplate::msg() or Skin::msg() at some point, but I'm reserving that
for a separate commit given wfMessage() is what MediaWikiI18N::translate()
currently does - to reduce risk of unrelated behaviour changes.
While `$tpl->setTranslator` and `MediaWikiI18N::set` ($tpl->translator->set)
have no known callers in Wikimedia Git, the `$tpl->translator->translate`
method does have a handful of calls (although less than three, and not in
bundled or WMF-deployed repos). As such, proceeding with hard-deprecation.
Bug: T186090
Change-Id: I93d503de5515298288852ec4c150959fd688786b
These methods have no callers anywhere in Wikimedia Git.
Deprecate it now, remove in MediaWiki 1.32.
This is part of removing the legacy MediaWikiI18N class.
Bug: T186090
Change-Id: Ie2ca6a4b4f4481dc5cd81e7ed5543a05ee611f42
Removed all use from core. It was only used in a handful of other
repos, most of which have been updated already.
Bug: T140664
Change-Id: I6b1ea3221022597ca38a5cd40eee040d34d1abb8
In phpcs.xml rename renamed sniffs and add the failing sniffs,
because now the whole sniff is no longer excluded.
Change-Id: If5b0bd16028761abc2c47ace9e97d37ad14bb36f
Despite the @return doctag, QuickTemplate::html does not return
template fields but prints them on stdout.
Also fix the doctags.
Bug: T137723
Change-Id: Ifb53ab5bdf3a4fac1e642fa6be1d88df6cef7bc7
Due to T127238, files in various */skins/* directories are not checked
by PHPCS. Temporarily removed the exclude rule from phpcs.xml and ran:
composer fix includes/skins/* tests/phpunit/includes/skins/* tests/phpunit/skins/*
Change-Id: I9240c1cee825920b6634903282be6252cce55686
The ConfirmEdit extension presently inserts captcha in the header of Usercreate
and Userlogin templates. The js,if enabled places the captcha before submit
button. A separate 'extrafields' placeholder for captcha is added just before
submit button in Usercreate.php so that captcha position remains consistent,
even if js is disabled. An extend method added to QuickTemplate to append any
data to existing field, rather than setting it with fresh data. Particular use
for 'extrafields' in Usercreate and Userlogin.
Bug: T85192
Change-Id: I82c68814e79cbc5aa250a308862c59fcbb6fd527