Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_Description.php |
— | — | @@ -296,7 +296,8 @@ |
297 | 297 | } |
298 | 298 | |
299 | 299 | public function getQueryString( $asvalue = false ) { |
300 | | - $result = '[[' . $this->m_concept->getConceptQuery() . ']]'; |
| 300 | + $pageValue = SMWDataValueFactory::newDataItemValue( $this->m_concept ); |
| 301 | + $result = '[[' . $pageValue->getPrefixedText() . ']]'; |
301 | 302 | if ( $asvalue ) { |
302 | 303 | return ' <q>' . $result . '</q> '; |
303 | 304 | } else { |
— | — | @@ -755,21 +756,21 @@ |
756 | 757 | |
757 | 758 | public function getQueryString( $asvalue = false ) { |
758 | 759 | $subdesc = $this->m_description; |
759 | | - $propertychain = $this->m_property->getWikiValue(); |
760 | | - $propertyname = 'loop ...'; |
761 | | - |
| 760 | + $propertyChainString = $this->m_property->getLabel(); |
| 761 | + $propertyname = $propertyChainString; |
| 762 | + |
762 | 763 | while ( ( $propertyname != '' ) && ( $subdesc instanceof SMWSomeProperty ) ) { // try to use property chain syntax |
763 | | - $propertyname = $subdesc->getProperty()->getWikiValue(); |
| 764 | + $propertyname = $subdesc->getProperty()->getLabel(); |
764 | 765 | if ( $propertyname != '' ) { |
765 | | - $propertychain .= '.' . $propertyname; |
| 766 | + $propertyChainString .= '.' . $propertyname; |
766 | 767 | $subdesc = $subdesc->getDescription(); |
767 | 768 | } |
768 | 769 | } |
769 | | - |
| 770 | + |
770 | 771 | if ( $asvalue ) { |
771 | | - return '<q>[[' . $propertychain . '::' . $subdesc->getQueryString( true ) . ']]</q>'; |
| 772 | + return '<q>[[' . $propertyChainString . '::' . $subdesc->getQueryString( true ) . ']]</q>'; |
772 | 773 | } else { |
773 | | - return '[[' . $propertychain . '::' . $subdesc->getQueryString( true ) . ']]'; |
| 774 | + return '[[' . $propertyChainString . '::' . $subdesc->getQueryString( true ) . ']]'; |
774 | 775 | } |
775 | 776 | } |
776 | 777 | |