r113170 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113169‎ | r113170 | r113171 >
Date:19:21, 6 March 2012
Author:jeroendedauw
Status:deferred
Tags:
Comment:
attempt to fix compat, bug 35003
Modified paths:
  • /trunk/extensions/SemanticResultFormats/GraphViz/SRF_Process.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticResultFormats/GraphViz/SRF_Process.php
@@ -150,11 +150,11 @@
151151 $row = $res->getNext(); // get initial row (i.e. array of SMWResultArray)
152152
153153 while ( $row !== false ) {
154 - $subject = $row[0]->getResultSubject(); // get Subject of the Result
 154+ /* SMWDataItem */ $subject = $row[0]->getResultSubject(); // get Subject of the Result
155155 // creates a new node if $val has type wikipage
156 - if ( $subject->getTypeID() == '_wpg' ) {
157 - $val = $subject->getShortWikiText();
158 - $node = $this->m_process->makeNode( $val, $val );
 156+ if ( $subject->getDIType() == SMWDataItem::TYPE_WIKIPAGE ) {
 157+ /* SMWDataValue */ $dataValue = SMWDataValueFactory::newDataItemValue( $subject, SMWDIProperty::getDataItemClassNameForId( $subject->getDIType() ) );
 158+ $node = $this->m_process->makeNode( $dataValue->getShortWikiText(), $dataValue->getShortWikiText() );
159159 }
160160
161161 //

Follow-up revisions

RevisionCommit summaryAuthorDate
r113263follow up to r113170jeroendedauw18:34, 7 March 2012