Index: trunk/extensions/SemanticMediaWiki/includes/datavalues/SMW_DV_WikiPage.php |
— | — | @@ -261,6 +261,8 @@ |
262 | 262 | * make a Title out of the given data. |
263 | 263 | * However, isValid() will return FALSE *after* this function failed in |
264 | 264 | * trying to create a title. |
| 265 | + * |
| 266 | + * @return Title |
265 | 267 | */ |
266 | 268 | public function getTitle() { |
267 | 269 | if ( ( $this->isValid() ) && ( $this->m_title === null ) ) { |
— | — | @@ -270,12 +272,14 @@ |
271 | 273 | $this->m_title = Title::newFromText( $this->getPrefixedText() ); |
272 | 274 | } |
273 | 275 | } |
| 276 | + |
274 | 277 | if ( $this->m_title === null ) { // should not normally happen, but anyway ... |
275 | 278 | global $wgContLang; |
276 | 279 | smwfLoadExtensionMessages( 'SemanticMediaWiki' ); |
277 | 280 | $this->addError( wfMsgForContent( 'smw_notitle', $wgContLang->getNsText( $this->m_namespace ) . ':' . $this->m_dbkeyform ) ); |
278 | 281 | $this->m_dbkeyform = ''; |
279 | 282 | } |
| 283 | + |
280 | 284 | return $this->m_title; |
281 | 285 | } |
282 | 286 | |