Yaron Koren has submitted this change and it was merged.
Change subject: Fixed display of "template" format for #cargo_compound_query
......................................................................
Fixed display of "template" format for #cargo_compound_query
Follow-up to 06e6905
Change-Id: Id569c4f4cbe912b43e06f0a94898dc855f8a1fd8
---
M parserfunctions/CargoCompoundQuery.php
1 file changed, 12 insertions(+), 1 deletion(-)
Approvals:
Yaron Koren: Verified; Looks good to me, approved
diff --git a/parserfunctions/CargoCompoundQuery.php
b/parserfunctions/CargoCompoundQuery.php
index faaa13a..bf26335 100644
--- a/parserfunctions/CargoCompoundQuery.php
+++ b/parserfunctions/CargoCompoundQuery.php
@@ -173,11 +173,22 @@
$text = $formatter->display( $allQueryResults,
$formattedQueryResults, $allFieldDescriptions,
$displayParams );
+ // The 'template' format gets special parsing, because
+ // it can be used to display a larger component, like a table,
+ // which means that everything needs to be parsed together
+ // instead of one instance at a time. Also, the template will
+ // contain wikitext, not HTML.
+ $displayHTML = ( $format != 'template' );
+
// Don't show a "view more" link.
// @TODO - is such a thing possible for a compound query,
// especially if there's a limit set for each query?
- return $parser->insertStripItem( $text, $parser->mStripState );
+ if ( $displayHTML ) {
+ return $parser->insertStripItem( $text,
$parser->mStripState );
+ } else {
+ return array( $text, 'noparse' => false );
+ }
}
}
--
To view, visit https://gerrit.wikimedia.org/r/191364
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id569c4f4cbe912b43e06f0a94898dc855f8a1fd8
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