Yaron Koren has submitted this change and it was merged.
Change subject: Fixed iteration through values for "dynamic table"
......................................................................
Fixed iteration through values for "dynamic table"
Change-Id: If251e979214cc19777ae15f488fdc8026a167753
---
M formats/CargoDynamicTableFormat.php
1 file changed, 7 insertions(+), 2 deletions(-)
Approvals:
Yaron Koren: Verified; Looks good to me, approved
diff --git a/formats/CargoDynamicTableFormat.php
b/formats/CargoDynamicTableFormat.php
index f002b2d..6967cb8 100644
--- a/formats/CargoDynamicTableFormat.php
+++ b/formats/CargoDynamicTableFormat.php
@@ -58,8 +58,13 @@
foreach ( $formattedValuesTable as $row ) {
$text .= "\t\t\t<tr>\n";
- foreach ( $row as $value ) {
- $text .= "\t\t\t\t<td>$value</td>\n";
+ foreach ( array_keys( $fieldDescriptions ) as $field ) {
+ if ( array_key_exists( $field, $row ) ) {
+ $value = $row[$field];
+ } else {
+ $value = null;
+ }
+ $text .= "\t\t\t\t" . Html::rawElement( 'td',
null, $value );
}
$text .= "\t\t\t</tr>\n";
}
--
To view, visit https://gerrit.wikimedia.org/r/191590
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If251e979214cc19777ae15f488fdc8026a167753
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Cargo
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren <[email protected]>
Gerrit-Reviewer: Yaron Koren <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits