Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_Description.php |
— | — | @@ -39,6 +39,9 @@ |
40 | 40 | if ( ($mode == SMWPrintRequest::PRINT_CCAT) && ($outputformat === '') ) { |
41 | 41 | $this->m_outputformat = 'x'; // changed default for Boolean case |
42 | 42 | } |
| 43 | + if ($this->m_data instanceof SMWDataValue) { |
| 44 | + $this->m_data->setCaption($label); |
| 45 | + } |
43 | 46 | } |
44 | 47 | |
45 | 48 | public function getMode() { |
— | — | @@ -64,7 +67,7 @@ |
65 | 68 | case SMWPrintRequest::PRINT_CCAT: |
66 | 69 | return $linker->makeLinkObj($this->m_data->getTitle(), htmlspecialchars($this->m_label)); |
67 | 70 | case SMWPrintRequest::PRINT_PROP: |
68 | | - return $this->m_data->getLongHTMLText($linker); |
| 71 | + return $this->m_data->getShortHTMLText($linker); |
69 | 72 | case SMWPrintRequest::PRINT_THIS: default: return htmlspecialchars($this->m_label); |
70 | 73 | } |
71 | 74 | |
— | — | @@ -80,7 +83,7 @@ |
81 | 84 | switch ($this->m_mode) { |
82 | 85 | case SMWPrintRequest::PRINT_CATS: return $this->m_label; // TODO: link to Special:Categories |
83 | 86 | case SMWPrintRequest::PRINT_PROP: |
84 | | - return $this->m_data->getLongWikiText($linked); |
| 87 | + return $this->m_data->getShortWikiText($linked); |
85 | 88 | case SMWPrintRequest::PRINT_CCAT: |
86 | 89 | return '[[:' . $this->m_data->getPrefixedText() . '|' . $this->m_label . ']]'; |
87 | 90 | case SMWPrintRequest::PRINT_THIS: default: return $this->m_label; |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_Property.php |
— | — | @@ -131,6 +131,13 @@ |
132 | 132 | } |
133 | 133 | } |
134 | 134 | |
| 135 | + public function setCaption($caption) { |
| 136 | + parent::setCaption($caption); |
| 137 | + if ($this->m_wikipage instanceof SMWDataValue) { // pass caption to embedded datavalue (used for printout) |
| 138 | + $this->m_wikipage->setCaption($caption); |
| 139 | + } |
| 140 | + } |
| 141 | + |
135 | 142 | /** |
136 | 143 | * Return TRUE if this is a usual wiki property that is defined by a wiki page, as |
137 | 144 | * opposed to a property that is pre-defined in the wiki. |