Yaron Koren has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403478 )
Change subject: Added "delimiter" param for "template" format ...................................................................... Added "delimiter" param for "template" format Change-Id: I311c48adb41940e066e10fce310ff738b22f7a25 --- M formats/CargoTemplateFormat.php 1 file changed, 7 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cargo refs/changes/78/403478/2 diff --git a/formats/CargoTemplateFormat.php b/formats/CargoTemplateFormat.php index a658188..1fa5b36 100644 --- a/formats/CargoTemplateFormat.php +++ b/formats/CargoTemplateFormat.php @@ -7,7 +7,7 @@ class CargoTemplateFormat extends CargoDisplayFormat { function allowedParameters() { - return array( 'template', 'named args' ); + return array( 'template', 'named args', 'delimiter' ); } function displayRow( $templateName, $row, $fieldDescriptions, $namedArgs ) { @@ -56,8 +56,13 @@ if ( array_key_exists( 'named args', $displayParams ) ) { $namedArgs = strtolower( $displayParams['named args'] ) == 'yes'; } + $delimiter = ( array_key_exists( 'delimiter', $displayParams ) ) ? + $displayParams['delimiter'] : ''; $text = ''; - foreach ( $valuesTable as $row ) { + foreach ( $valuesTable as $i => $row ) { + if ( $i > 0 ) { + $text .= $delimiter; + } $text .= $this->displayRow( $templateName, $row, $fieldDescriptions, $namedArgs ); } global $wgTitle; -- To view, visit https://gerrit.wikimedia.org/r/403478 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I311c48adb41940e066e10fce310ff738b22f7a25 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Cargo Gerrit-Branch: master Gerrit-Owner: Yaron Koren <yaro...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits