Mwjames has uploaded a new change for review.
https://gerrit.wikimedia.org/r/49458
Change subject: (Bug 45053) Support _qty property display
......................................................................
(Bug 45053) Support _qty property display
Enable SMW\Highlighter display support of property type _qty
in SMW\ListResultPrinter
Change-Id: I2c68927ff9b155dc6a174daf719079f6a5592827
---
M includes/queryprinters/ListResultPrinter.php
1 file changed, 9 insertions(+), 4 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticMediaWiki
refs/changes/58/49458/1
diff --git a/includes/queryprinters/ListResultPrinter.php
b/includes/queryprinters/ListResultPrinter.php
index 11d53c7..0ced63e 100644
--- a/includes/queryprinters/ListResultPrinter.php
+++ b/includes/queryprinters/ListResultPrinter.php
@@ -294,10 +294,15 @@
$result .=
$field->getPrintRequest()->getText( SMW_OUTPUT_WIKI, ( $this->mShowHeaders ==
SMW_HEADERS_PLAIN ? null:$this->mLinker ) ) . ' ';
}
}
- // Display the text with tags for all non-list
type outputs but
- // for others remove tags to ensure that lists
are not distorted by
- // unresolved in-text tags
- $result .= $options['plainlist'] ? $text :
Sanitizer::stripAllTags( $text );
+ // Display the text with tags for all non-list
type outputs and
+ // where the property is of type _qty (to
ensure the highlighter
+ // is displayed) but for others remove tags so
that lists are
+ // not distorted by unresolved in-text tags
+ if ( $dataValue->getTypeID() === '_qty' ||
$options['plainlist'] ) {
+ $result .= $text;
+ } else {
+ $result .= Sanitizer::stripAllTags(
$text );
+ }
}
$first_col = false;
--
To view, visit https://gerrit.wikimedia.org/r/49458
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2c68927ff9b155dc6a174daf719079f6a5592827
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticMediaWiki
Gerrit-Branch: master
Gerrit-Owner: Mwjames <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits