[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: TemplateHelper: Adjust for c67539341 in MW core
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/330337 ) 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 --- M includes/TemplateHelper.php 1 file changed, 6 insertions(+), 2 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved 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/330337 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: master Gerrit-Owner: CatropeGerrit-Reviewer: Jforrester 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[master]: TemplateHelper: Adjust for c67539341 in MW core
Catrope has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/330337 ) 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 --- M includes/TemplateHelper.php 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/37/330337/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/330337 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: master Gerrit-Owner: Catrope___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits