Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_WikiPage.php |
— | — | @@ -62,7 +62,7 @@ |
63 | 63 | case '_wpp' : case '__sup': |
64 | 64 | $this->m_fixNamespace = SMW_NS_PROPERTY; |
65 | 65 | break; |
66 | | - case '_wpc' : case '__suc': |
| 66 | + case '_wpc' : case '__suc': case '__sin': |
67 | 67 | $this->m_fixNamespace = NS_CATEGORY; |
68 | 68 | break; |
69 | 69 | case '_wpf' : case '__spf': |
— | — | @@ -157,7 +157,7 @@ |
158 | 158 | return $this->getErrorText(); |
159 | 159 | } |
160 | 160 | if ( ($linked === NULL) || ($linked === false) || ($this->m_outformat == '-') ) { |
161 | | - return $this->getPrefixedText(); |
| 161 | + return $this->m_fixNamespace == NS_MAIN?$this->getPrefixedText():$this->getText(); |
162 | 162 | } elseif ($this->m_namespace == NS_IMAGE) { // embed images instead of linking to their page |
163 | 163 | return '[[' . str_replace("'", ''', $this->getPrefixedText()) . '|' . $this->m_textform . '|frameless|border|text-top]]'; |
164 | 164 | } else { // this takes care of all other cases, esp. it is right for Media: |
— | — | @@ -172,7 +172,7 @@ |
173 | 173 | return $this->getErrorText(); |
174 | 174 | } |
175 | 175 | if ( ($linker === NULL) || ($this->m_outformat == '-') ) { |
176 | | - return htmlspecialchars($this->getPrefixedText()); |
| 176 | + return htmlspecialchars($this->m_fixNamespace == NS_MAIN?$this->getPrefixedText():$this->getText()); |
177 | 177 | } elseif ($this->getNamespace() == NS_MEDIA) { // this extra case is really needed |
178 | 178 | return $linker->makeMediaLinkObj($this->getTitle(), $this->m_textform); |
179 | 179 | } else { // all others use default linking, no embedding of images here |
— | — | @@ -339,9 +339,13 @@ |
340 | 340 | $this->m_title = $title; |
341 | 341 | } |
342 | 342 | |
343 | | - /// Get the (default) caption for this value. |
| 343 | + /** |
| 344 | + * Get the (default) caption for this value. |
| 345 | + * If a fixed namespace is set, we do not return the namespace prefix explicitly. |
| 346 | + */ |
344 | 347 | protected function getCaption() { |
345 | | - return $this->m_caption !== false?$this->m_caption:$this->getPrefixedText(); |
| 348 | + return $this->m_caption !== false?$this->m_caption: |
| 349 | + ($this->m_fixNamespace == NS_MAIN?$this->getPrefixedText():$this->getText()); |
346 | 350 | } |
347 | 351 | |
348 | 352 | /** |