Index: trunk/extensions/SemanticResultFormats/iCalendar/SRF_iCalendar.php |
— | — | @@ -146,12 +146,8 @@ |
147 | 147 | $result = ''; |
148 | 148 | |
149 | 149 | $wikipage = $row[0]->getResultSubject(); // get the object |
| 150 | + $wikipage = SMWDataValueFactory::newDataItemValue( $wikipage, null ); |
150 | 151 | |
151 | | - // As of SMW 1.6, a SMWDiWikiPage object will be provided instead of a SMWWikiPageValue. |
152 | | - if ( class_exists( 'SMWDiWikiPage' ) && $wikipage instanceof SMWDiWikiPage ) { |
153 | | - $wikipage = SMWDataValueFactory::newDataItemValue( $wikipage, null ); |
154 | | - } |
155 | | - |
156 | 152 | $startdate = false; |
157 | 153 | $enddate = false; |
158 | 154 | $location = ''; |
Index: trunk/extensions/SemanticResultFormats/Timeline/SRF_Timeline.php |
— | — | @@ -162,15 +162,9 @@ |
163 | 163 | |
164 | 164 | if ( $dataValue == '' ) { |
165 | 165 | $date_value = null; |
166 | | - } // SMW >= 1.6 |
167 | | - elseif ( method_exists ( $dataValue, 'getDataItem' ) ) { |
168 | | - $date_value = $dataValue->getDataItem()->getLabel(); |
169 | | - } // SMW 1.5.x |
170 | | - elseif ( method_exists ( $dataValue, 'getValueKey' ) ) { |
171 | | - $date_value = $dataValue->getValueKey(); |
172 | | - } // SMW < 1.5 |
| 166 | + } |
173 | 167 | else { |
174 | | - $date_value = $dataValue->getXSDValue(); |
| 168 | + $date_value = $dataValue->getDataItem()->getLabel(); |
175 | 169 | } |
176 | 170 | |
177 | 171 | while ( ( $object = efSRFGetNextDV( $field ) ) !== false ) { // Loop over property values |
— | — | @@ -344,21 +338,10 @@ |
345 | 339 | } |
346 | 340 | |
347 | 341 | if ( $isEventline && ( $pr->getMode() == SMWPrintRequest::PRINT_PROP ) && ( $pr->getTypeID() == '_dat' ) && ( '' != $pr->getLabel() ) && ( $date_value != $this->m_tlstart ) && ( $date_value != $this->m_tlend ) ) { |
348 | | - // SMW >= 1.6 |
349 | | - if ( method_exists ( $object, 'getDataItem' ) ) { |
350 | | - $numericValue = $object->getDataItem()->getSortKey(); |
351 | | - } // SMW 1.5.x |
352 | | - elseif ( method_exists ( $object, 'getValueKey' ) ) { |
353 | | - $numericValue = $object->getValueKey(); |
354 | | - } // SMW < 1.5 |
355 | | - else { |
356 | | - $numericValue = $object->getNumericValue(); |
357 | | - } |
358 | | - |
359 | 342 | $event = array( |
360 | 343 | $object->getXMLSchemaDate(), |
361 | 344 | $pr->getLabel(), |
362 | | - $numericValue, |
| 345 | + $object->getDataItem()->getSortKey(), |
363 | 346 | ); |
364 | 347 | } |
365 | 348 | |
Index: trunk/extensions/SemanticResultFormats/jqPlot/SRF_jqPlotPie.php |
— | — | @@ -118,14 +118,7 @@ |
119 | 119 | foreach ( $row as $field ) { |
120 | 120 | while ( ( $object = efSRFGetNextDV( $field ) ) !== false ) { |
121 | 121 | if ( $object->isNumeric() ) { // use numeric sortkey |
122 | | - |
123 | | - // getDataItem was introduced in SMW 1.6, getValueKey was deprecated in the same version. |
124 | | - if ( method_exists( $object, 'getDataItem' ) ) { |
125 | | - $nr = $object->getDataItem()->getSortKey(); |
126 | | - } else { |
127 | | - $nr = $object->getValueKey(); |
128 | | - } |
129 | | - |
| 122 | + $nr = $object->getDataItem()->getSortKey(); |
130 | 123 | $pie_data[] .= "['$name', $nr]"; |
131 | 124 | } |
132 | 125 | } |
Index: trunk/extensions/SemanticResultFormats/jqPlot/SRF_jqPlotBar.php |
— | — | @@ -140,13 +140,7 @@ |
141 | 141 | foreach ( $row as $field ) { |
142 | 142 | while ( ( $object = efSRFGetNextDV( $field ) ) !== false ) { |
143 | 143 | if ( $object->isNumeric() ) { |
144 | | - // getDataItem was introduced in SMW 1.6, getValueKey was deprecated in the same version. |
145 | | - if ( method_exists( $object, 'getDataItem' ) ) { |
146 | | - $numbers[] = $object->getDataItem()->getSortKey(); |
147 | | - } else { |
148 | | - $numbers[] = $object->getValueKey(); |
149 | | - } |
150 | | - |
| 144 | + $numbers[] = $object->getDataItem()->getSortKey(); |
151 | 145 | $labels[] = "'$name'"; |
152 | 146 | } |
153 | 147 | } |