Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QueryProcessor.php |
— | — | @@ -205,16 +205,16 @@ |
206 | 206 | continue; |
207 | 207 | } |
208 | 208 | |
209 | | - if ( $title->getNamespace() == SMW_NS_PROPERTY ) { |
| 209 | + if ( $title->getNamespace() == NS_CATEGORY ) { |
| 210 | + $printmode = SMWPrintRequest::PRINT_CCAT; |
| 211 | + $data = $title; |
| 212 | + $label = $showmode ? '' : $title->getText(); // default |
| 213 | + } else { // enforce interpretation as property (even if it starts with something that looks like another namespace) |
210 | 214 | $printmode = SMWPrintRequest::PRINT_PROP; |
211 | 215 | $property = SMWPropertyValue::makeUserProperty( trim( $propparts[0] ) ); |
212 | 216 | $data = $property; |
213 | 217 | $label = $showmode ? '' : $property->getWikiValue(); // default |
214 | | - } elseif ( $title->getNamespace() == NS_CATEGORY ) { |
215 | | - $printmode = SMWPrintRequest::PRINT_CCAT; |
216 | | - $data = $title; |
217 | | - $label = $showmode ? '' : $title->getText(); // default |
218 | | - } // else? |
| 218 | + } |
219 | 219 | } |
220 | 220 | |
221 | 221 | if ( count( $propparts ) == 1 ) { // no outputformat found, leave empty |