r25579 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25578‎ | r25579 | r25580 >
Date:10:39, 6 September 2007
Author:mkroetzsch
Status:old
Tags:
Comment:
Fixed another bug in timelinestart/-end parameter
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_QueryPrinters.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QueryPrinters.php
@@ -367,10 +367,10 @@
368368 foreach ($res->getPrintRequests() as $pr) {
369369 if ( ($pr->getMode() == SMW_PRINT_PROP) && ($pr->getTypeID() == '_dat') ) {
370370 if ( ($this->m_tlend == '') && ($this->m_tlstart != '') &&
371 - ($this->m_tlstart != $pr->getTitle()->getText()) ) {
372 - $this->m_tlend = $pr->getTitle()->getText();
373 - } elseif ( ($this->m_tlstart == '') && ($this->m_tlend != $pr->getTitle()->getText()) ) {
374 - $this->m_tlstart = $pr->getTitle()->getText();
 371+ ($this->m_tlstart != $pr->getTitle()->getDBKey()) ) {
 372+ $this->m_tlend = $pr->getTitle()->getDBKey();
 373+ } elseif ( ($this->m_tlstart == '') && ($this->m_tlend != $pr->getTitle()->getDBKey()) ) {
 374+ $this->m_tlstart = $pr->getTitle()->getDBKey();
375375 }
376376 }
377377 }
@@ -413,7 +413,7 @@
414414 }
415415 // is this a start date?
416416 if ( ($pr->getMode() == SMW_PRINT_PROP) &&
417 - ($pr->getTitle()->getText() == $this->m_tlstart) ) {
 417+ ($pr->getTitle()->getDBKey() == $this->m_tlstart) ) {
418418 //FIXME: Timeline scripts should support XSD format explicitly. They
419419 //currently seem to implement iso8601 which deviates from XSD in cases.
420420 //NOTE: We can assume $object to be an SMWDataValue in this case.
@@ -423,7 +423,7 @@
424424 }
425425 // is this the end date?
426426 if ( ($pr->getMode() == SMW_PRINT_PROP) &&
427 - ($pr->getTitle()->getText() == $this->m_tlend) ) {
 427+ ($pr->getTitle()->getDBKey() == $this->m_tlend) ) {
428428 //NOTE: We can assume $object to be an SMWDataValue in this case.
429429 $curmeta .= '<span class="smwtlend">' . $object->getXSDValue() . '</span>';
430430 }

Status & tagging log