Index: trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialSearchByProperty.php |
— | — | @@ -270,6 +270,7 @@ |
271 | 271 | * |
272 | 272 | * @param[in] $count int How many entities have the exact same value on the property? |
273 | 273 | * @param[in] $greater bool Should the values be bigger? Set false for smaller values |
| 274 | + * |
274 | 275 | * @return array of array of SMWWikiPageValue, SMWDataValue with the first being the entity, and the second the value |
275 | 276 | */ |
276 | 277 | private function getNearbyResults( $count, $greater = true ) { |
— | — | @@ -298,15 +299,18 @@ |
299 | 300 | |
300 | 301 | $result = $results->getNext(); |
301 | 302 | $ret = array(); |
| 303 | + |
302 | 304 | while ( $result ) { |
303 | | - array_push( $ret, array( $result[0]->getNextObject(), $result[1]->getNextObject() ) ); |
| 305 | + array_push( $ret, array( $result[0]->getNextDataValue(), $result[1]->getNextDataValue() ) ); |
304 | 306 | $result = $results->getNext(); |
305 | 307 | } |
| 308 | + |
306 | 309 | if ( !$greater ) { |
307 | 310 | $temp = array(); |
308 | 311 | while ( $ret ) array_push( $temp, array_pop( $ret ) ); |
309 | 312 | $ret = $temp; |
310 | 313 | } |
| 314 | + |
311 | 315 | return $ret; |
312 | 316 | } |
313 | 317 | |
— | — | @@ -325,4 +329,5 @@ |
326 | 330 | |
327 | 331 | return $html; |
328 | 332 | } |
| 333 | + |
329 | 334 | } |
Index: trunk/extensions/SemanticMediaWiki/includes/export/SMW_ExportController.php |
— | — | @@ -237,7 +237,7 @@ |
238 | 238 | $pinst = new SMWDIProperty( '_INST' ); |
239 | 239 | |
240 | 240 | while ( $resarray !== false ) { |
241 | | - $instance = end( $resarray )->getNextObject(); |
| 241 | + $instance = end( $resarray )->getNextDataValue(); |
242 | 242 | |
243 | 243 | $stb = new SMWSmallTitle(); |
244 | 244 | $stb->dbkey = $instance->getDBkey(); |
Index: trunk/extensions/SemanticMediaWiki/includes/articlepages/SMW_ConceptPage.php |
— | — | @@ -33,6 +33,7 @@ |
34 | 34 | if ( $this->limit > 0 ) { |
35 | 35 | $store = smwfGetStore(); |
36 | 36 | $desc = new SMWConceptDescription( $this->mTitle ); |
| 37 | + |
37 | 38 | if ( $this->from != '' ) { |
38 | 39 | $dv = SMWWikiPageValue::makePage( $this->from, NS_MAIN ); // make a dummy wiki page as boundary |
39 | 40 | $fromdesc = new SMWValueDescription( $dv, SMW_CMP_GEQ ); |
— | — | @@ -47,6 +48,7 @@ |
48 | 49 | } else { |
49 | 50 | $order = 'ASC'; |
50 | 51 | } |
| 52 | + |
51 | 53 | $desc->addPrintRequest( new SMWPrintRequest( SMWPrintRequest::PRINT_THIS, '' ) ); |
52 | 54 | $query = new SMWQuery( $desc ); |
53 | 55 | $query->sortkeys[''] = $order; |
— | — | @@ -54,13 +56,16 @@ |
55 | 57 | |
56 | 58 | $result = $store->getQueryResult( $query ); |
57 | 59 | $row = $result->getNext(); |
| 60 | + |
58 | 61 | while ( $row !== false ) { |
59 | | - $this->articles[] = end( $row )->getNextObject(); |
| 62 | + $this->articles[] = end( $row )->getNextDataValue(); |
60 | 63 | $row = $result->getNext(); |
61 | 64 | } |
| 65 | + |
62 | 66 | if ( $order == 'DESC' ) { |
63 | 67 | $this->articles = array_reverse( $this->articles ); |
64 | 68 | } |
| 69 | + |
65 | 70 | $this->m_errors = $query->getErrors(); |
66 | 71 | } else { |
67 | 72 | $this->articles = array(); |
— | — | @@ -98,6 +103,7 @@ |
99 | 104 | */ |
100 | 105 | private function formatList( $cutoff = 6 ) { |
101 | 106 | $end = count( $this->articles ); |
| 107 | + |
102 | 108 | if ( $end > $this->limit ) { |
103 | 109 | if ( $this->until != '' ) { |
104 | 110 | $start = 1; |
— | — | @@ -115,6 +121,7 @@ |
116 | 122 | // for short lists of articles |
117 | 123 | return $this->shortList( $start, $end, $this->articles ); |
118 | 124 | } |
| 125 | + |
119 | 126 | return ''; |
120 | 127 | } |
121 | 128 | |