r88170 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88169‎ | r88170 | r88171 >
Date:12:48, 15 May 2011
Author:mkroetzsch
Status:deferred
Tags:
Comment:
fixed type id used for internal dataitem (this lead to a bug in roundtripping the data when displaying it in the factbox after parsing)
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/datavalues/SMW_DV_TypeList.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/datavalues/SMW_DV_TypeList.php
@@ -75,11 +75,11 @@
7676 $stringvalue .= $tv->getDBkey();
7777 }
7878 try {
79 - $this->m_dataitem = new SMWDIString( $stringvalue );
 79+ $this->m_dataitem = new SMWDIString( $stringvalue, $this->m_typeid );
8080 } catch ( SMWStringLengthException $e ) {
8181 smwfLoadExtensionMessages( 'SemanticMediaWiki' );
8282 $this->addError( wfMsgForContent( 'smw_maxstring', '"' . $stringvalue . '"' ) );
83 - $this->m_dataitem = new SMWDIString( 'ERROR' );
 83+ $this->m_dataitem = new SMWDIString( 'ERROR', $this->m_typeid );
8484 }
8585 }
8686
@@ -100,7 +100,7 @@
101101 }
102102
103103 public function getShortWikiText( $linked = null ) {
104 - return ( $this->m_caption !== false ) ? $this->m_caption : $this->makeOutputText( 0, $linked );
 104+ return ( $this->m_caption !== false ) ? $this->m_caption : $this->makeOutputText( 0, $linked );
105105 }
106106
107107 public function getShortHTMLText( $linker = null ) {

Status & tagging log