Index: trunk/extensions/SemanticMediaWiki/includes/datavalues/SMW_DV_Property.php |
— | — | @@ -186,19 +186,39 @@ |
187 | 187 | } |
188 | 188 | |
189 | 189 | public function getShortWikiText( $linked = null ) { |
190 | | - return $this->isVisible() ? $this->highlightText( $this->getWikiPageValue()->getShortWikiText( $linked ) ) : ''; |
| 190 | + if ( $this->isVisible() ) { |
| 191 | + $wikiPageValue = $this->getWikiPageValue(); |
| 192 | + return is_null( $wikiPageValue ) ? '' : $this->highlightText( $wikiPageValue->getShortWikiText( $linked ) ); |
| 193 | + } else { |
| 194 | + return ''; |
| 195 | + } |
191 | 196 | } |
192 | 197 | |
193 | 198 | public function getShortHTMLText( $linker = null ) { |
194 | | - return $this->isVisible() ? $this->highlightText( $this->getWikiPageValue()->getShortHTMLText( $linker ) ) : ''; |
| 199 | + if ( $this->isVisible() ) { |
| 200 | + $wikiPageValue = $this->getWikiPageValue(); |
| 201 | + return is_null( $wikiPageValue ) ? '' : $this->highlightText( $wikiPageValue->getShortHTMLText( $linked ) ); |
| 202 | + } else { |
| 203 | + return ''; |
| 204 | + } |
195 | 205 | } |
196 | 206 | |
197 | 207 | public function getLongWikiText( $linked = null ) { |
198 | | - return $this->isVisible() ? $this->highlightText( $this->getWikiPageValue()->getLongWikiText( $linked ) ) : ''; |
| 208 | + if ( $this->isVisible() ) { |
| 209 | + $wikiPageValue = $this->getWikiPageValue(); |
| 210 | + return is_null( $wikiPageValue ) ? '' : $this->highlightText( $wikiPageValue->getLongWikiText( $linked ) ); |
| 211 | + } else { |
| 212 | + return ''; |
| 213 | + } |
199 | 214 | } |
200 | 215 | |
201 | 216 | public function getLongHTMLText( $linker = null ) { |
202 | | - return $this->isVisible() ? $this->highlightText( $this->getWikiPageValue()->getLongHTMLText( $linker ) ) : ''; |
| 217 | + if ( $this->isVisible() ) { |
| 218 | + $wikiPageValue = $this->getWikiPageValue(); |
| 219 | + return is_null( $wikiPageValue ) ? '' : $this->highlightText( $wikiPageValue->getLongHTMLText( $linked ) ); |
| 220 | + } else { |
| 221 | + return ''; |
| 222 | + } |
203 | 223 | } |
204 | 224 | |
205 | 225 | public function getWikiValue() { |