summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticResultFormats/formats/tagcloud/TagCloud.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/extensions/SemanticResultFormats/formats/tagcloud/TagCloud.php')
-rw-r--r--www/wiki/extensions/SemanticResultFormats/formats/tagcloud/TagCloud.php17
1 files changed, 13 insertions, 4 deletions
diff --git a/www/wiki/extensions/SemanticResultFormats/formats/tagcloud/TagCloud.php b/www/wiki/extensions/SemanticResultFormats/formats/tagcloud/TagCloud.php
index 2ad18154..a10a7ab7 100644
--- a/www/wiki/extensions/SemanticResultFormats/formats/tagcloud/TagCloud.php
+++ b/www/wiki/extensions/SemanticResultFormats/formats/tagcloud/TagCloud.php
@@ -119,11 +119,20 @@ class TagCloud extends ResultPrinter {
continue;
}
+ $value = null;
+
// Get the HTML for the tag content. Pages are linked, other stuff is just plaintext.
- if ( $dataValue->getTypeID() === '_wpg' && $dataValue->getTitle() instanceof Title ) {
- $value = $dataValue->getTitle()->getPrefixedText();
- $html = $dataValue->getLongText( $outputMode, $this->getLinker( $isSubject ) );
- } else {
+ if ( $dataValue->getTypeID() === '_wpg' ) {
+
+ $title = $dataValue->getDataItem()->getTitle();
+
+ if ( $title instanceof Title ) {
+ $value = $title->getPrefixedText();
+ $html = $dataValue->getLongText( $outputMode, $this->getLinker( $isSubject ) );
+ }
+ }
+
+ if ( $value === null ) {
$html = $dataValue->getShortText( $outputMode, $this->getLinker( false ) );
$value = $html;
}