[MediaWiki-commits] [Gerrit] mediawiki...Flow[wmf/1.29.0-wmf.7]: TemplateHelper: Adjust for c67539341 in MW core

2017-01-03 Thread MaxSem (Code Review)
MaxSem has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/330338 )

Change subject: TemplateHelper: Adjust for c67539341 in MW core
..


TemplateHelper: Adjust for c67539341 in MW core

You're no longer allowed to pass associative parameter arrays to wfMessage(),
so use array_values() to turn the parameter array into a normal array.
Also add a comment explaning the Rube Goldberg-esque way in which the
array ends up being ordered correctly.

Bug: T154548
Change-Id: Ia4cbbb76bc5f2ff947b01218ff88e5b08e13b6e3
(cherry picked from commit 1d1097bd9e4522879f6fdb4dd182b74af13aae45)
---
M includes/TemplateHelper.php
1 file changed, 6 insertions(+), 2 deletions(-)

Approvals:
  Catrope: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/TemplateHelper.php b/includes/TemplateHelper.php
index 9217741..23fd09c 100644
--- a/includes/TemplateHelper.php
+++ b/includes/TemplateHelper.php
@@ -436,8 +436,12 @@
$i18nKey = $revision['properties']['_key'];
unset( $revision['properties']['_key'] );
 
-   // a variety of the i18n history messages contain wikitext and 
require ->parse()
-   return self::html( wfMessage( $i18nKey, $revision['properties'] 
)->parse() );
+   // $revision['properties'] contains the params for the i18n 
message, which are named,
+   // so we need array_values() to strip the names. They are in 
the correct order because
+   // RevisionFormatter::getDescriptionParams() uses a foreach 
loop to build this array
+   // from the i18n-params definition in FlowActions.php.
+   // A variety of the i18n history messages contain wikitext and 
require ->parse().
+   return self::html( wfMessage( $i18nKey, array_values( 
$revision['properties'] ) )->parse() );
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia4cbbb76bc5f2ff947b01218ff88e5b08e13b6e3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: wmf/1.29.0-wmf.7
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Flow[wmf/1.29.0-wmf.7]: TemplateHelper: Adjust for c67539341 in MW core

2017-01-03 Thread Catrope (Code Review)
Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330338 )

Change subject: TemplateHelper: Adjust for c67539341 in MW core
..

TemplateHelper: Adjust for c67539341 in MW core

You're no longer allowed to pass associative parameter arrays to wfMessage(),
so use array_values() to turn the parameter array into a normal array.
Also add a comment explaning the Rube Goldberg-esque way in which the
array ends up being ordered correctly.

Bug: T154548
Change-Id: Ia4cbbb76bc5f2ff947b01218ff88e5b08e13b6e3
(cherry picked from commit 1d1097bd9e4522879f6fdb4dd182b74af13aae45)
---
M includes/TemplateHelper.php
1 file changed, 6 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/38/330338/1

diff --git a/includes/TemplateHelper.php b/includes/TemplateHelper.php
index 9217741..23fd09c 100644
--- a/includes/TemplateHelper.php
+++ b/includes/TemplateHelper.php
@@ -436,8 +436,12 @@
$i18nKey = $revision['properties']['_key'];
unset( $revision['properties']['_key'] );
 
-   // a variety of the i18n history messages contain wikitext and 
require ->parse()
-   return self::html( wfMessage( $i18nKey, $revision['properties'] 
)->parse() );
+   // $revision['properties'] contains the params for the i18n 
message, which are named,
+   // so we need array_values() to strip the names. They are in 
the correct order because
+   // RevisionFormatter::getDescriptionParams() uses a foreach 
loop to build this array
+   // from the i18n-params definition in FlowActions.php.
+   // A variety of the i18n history messages contain wikitext and 
require ->parse().
+   return self::html( wfMessage( $i18nKey, array_values( 
$revision['properties'] ) )->parse() );
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia4cbbb76bc5f2ff947b01218ff88e5b08e13b6e3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: wmf/1.29.0-wmf.7
Gerrit-Owner: Catrope 

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