jenkins-bot has submitted this change and it was merged.

Change subject: BaseTemplate: Make getMsg() calling pattern more like 
wfMessage()
......................................................................


BaseTemplate: Make getMsg() calling pattern more like wfMessage()

wfMessage() and IContextSource::msg() allow you to pass parameters to
the message in the initial function call, which is often more convenient
for developers. Support that in BaseTemplate::getMsg() too for
standardization.

Change-Id: I2488234f431be5bab00ca4366d864c84d7ff9e03
---
M includes/skins/BaseTemplate.php
1 file changed, 3 insertions(+), 2 deletions(-)

Approvals:
  Krinkle: Looks good to me, approved
  Jack Phoenix: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/includes/skins/BaseTemplate.php b/includes/skins/BaseTemplate.php
index 87865df..6ea8b89 100644
--- a/includes/skins/BaseTemplate.php
+++ b/includes/skins/BaseTemplate.php
@@ -29,10 +29,11 @@
         * Get a Message object with its context set
         *
         * @param string $name Message name
+        * @param ... $params Message params
         * @return Message
         */
-       public function getMsg( $name ) {
-               return $this->getSkin()->msg( $name );
+       public function getMsg( $name /* ... */ ) {
+               return call_user_func_array( [ $this->getSkin(), 'msg' ], 
func_get_args() );
        }
 
        function msg( $str ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/315896
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I2488234f431be5bab00ca4366d864c84d7ff9e03
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm <legoktm.wikipe...@gmail.com>
Gerrit-Reviewer: Isarra <zhoris...@gmail.com>
Gerrit-Reviewer: Jack Phoenix <j...@countervandalism.net>
Gerrit-Reviewer: Krinkle <krinklem...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to