r81763 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81762‎ | r81763 | r81764 >
Date:17:18, 8 February 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
added doc
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/datavalues/SMW_DV_WikiPage.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/datavalues/SMW_DV_WikiPage.php
@@ -261,6 +261,8 @@
262262 * make a Title out of the given data.
263263 * However, isValid() will return FALSE *after* this function failed in
264264 * trying to create a title.
 265+ *
 266+ * @return Title
265267 */
266268 public function getTitle() {
267269 if ( ( $this->isValid() ) && ( $this->m_title === null ) ) {
@@ -270,12 +272,14 @@
271273 $this->m_title = Title::newFromText( $this->getPrefixedText() );
272274 }
273275 }
 276+
274277 if ( $this->m_title === null ) { // should not normally happen, but anyway ...
275278 global $wgContLang;
276279 smwfLoadExtensionMessages( 'SemanticMediaWiki' );
277280 $this->addError( wfMsgForContent( 'smw_notitle', $wgContLang->getNsText( $this->m_namespace ) . ':' . $this->m_dbkeyform ) );
278281 $this->m_dbkeyform = '';
279282 }
 283+
280284 return $this->m_title;
281285 }
282286

Status & tagging log