Index: trunk/extensions/SemanticResultFormats/TagCloud/SRF_TagCloud.php |
— | — | @@ -127,16 +127,17 @@ |
128 | 128 | for ( $i = 0, $n = count( $row ); $i < $n; $i++ ) { // Properties |
129 | 129 | while ( ( $obj = efSRFGetNextDV( $row[$i] ) ) !== false ) { // Property values |
130 | 130 | |
| 131 | + $isSubject = $row[$i]->getPrintRequest()->getMode() == SMWPrintRequest::PRINT_THIS; |
| 132 | + |
131 | 133 | // If the main object should not be included, skip it. |
132 | | - // The isMainObject method was added in SMW 1.5.6, so this can only be done correctly if it's available. |
133 | | - if ( $i == 0 && !$this->includeName && method_exists( $obj, 'isMainObject' ) && $obj->isMainObject() ) { |
| 134 | + if ( $i == 0 && !$this->includeName && $isSubject ) { |
134 | 135 | continue; |
135 | 136 | } |
136 | 137 | |
137 | 138 | // Get the HTML for the tag content. Pages are linked, other stuff is just plaintext. |
138 | 139 | if ( $obj->getTypeID() == '_wpg' ) { |
139 | 140 | $value = $obj->getTitle()->getText(); |
140 | | - $html = $obj->getLongText( $outputmode, $this->getLinker( method_exists( $obj, 'isMainObject' ) && $obj->isMainObject() ) ); |
| 141 | + $html = $obj->getLongText( $outputmode, $isSubject ); |
141 | 142 | } |
142 | 143 | else { |
143 | 144 | $html = $obj->getShortText( $outputmode, $this->getLinker( false ) ); |