Index: trunk/extensions/SemanticCompoundQueries/SCQ_QueryProcessor.php |
— | — | @@ -27,7 +27,6 @@ |
28 | 28 | array_shift( $params ); // We already know the $parser. |
29 | 29 | |
30 | 30 | $other_params = array(); |
31 | | - $query_result = null; |
32 | 31 | $results = array(); |
33 | 32 | |
34 | 33 | foreach ( $params as $param ) { |
— | — | @@ -38,15 +37,7 @@ |
39 | 38 | $sub_params = self::getSubParams( $param ); |
40 | 39 | $next_result = self::getQueryResultFromFunctionParams( $sub_params, SMW_OUTPUT_WIKI ); |
41 | 40 | |
42 | | - if ( method_exists( $next_result, 'getResults' ) ) { // SMW 1.5+ |
43 | | - $results = self::mergeSMWQueryResults( $results, $next_result->getResults() ); |
44 | | - } else { |
45 | | - if ( $query_result == null ) { |
46 | | - $query_result = new SCQQueryResult( $next_result->getPrintRequests(), new SMWQuery() ); |
47 | | - } |
48 | | - |
49 | | - $query_result->addResult( $next_result ); |
50 | | - } |
| 41 | + $results = self::mergeSMWQueryResults( $results, $next_result->getResults() ); |
51 | 42 | } else { |
52 | 43 | $parts = explode( '=', $param, 2 ); |
53 | 44 | |
— | — | @@ -56,14 +47,9 @@ |
57 | 48 | } |
58 | 49 | } |
59 | 50 | |
60 | | - // SMW 1.5+ |
61 | | - if ( is_null( $query_result ) ) { |
62 | | - $query_result = new SCQQueryResult( $next_result->getPrintRequests(), new SMWQuery(), $results, smwfGetStore() ); |
63 | | - } |
64 | | - |
| 51 | + $query_result = new SCQQueryResult( $next_result->getPrintRequests(), new SMWQuery(), $results, smwfGetStore() ); |
65 | 52 | $result = self::getResultFromQueryResult( $query_result, $other_params, SMW_OUTPUT_WIKI ); |
66 | 53 | } else { |
67 | | - wfLoadExtensionMessages( 'SemanticMediaWiki' ); |
68 | 54 | $result = smwfEncodeMessages( array( wfMsgForContent( 'smw_iq_disabled' ) ) ); |
69 | 55 | } |
70 | 56 | |
— | — | @@ -189,12 +175,8 @@ |
190 | 176 | $display_options[$key] = $value; |
191 | 177 | } |
192 | 178 | |
193 | | - if ( method_exists( $query_result, 'getResults' ) ) { // SMW 1.5+ |
194 | | - foreach ( $query_result->getResults() as $wiki_page ) { |
195 | | - $wiki_page->display_options = $display_options; |
196 | | - } |
197 | | - } else { |
198 | | - $query_result->display_options = $display_options; |
| 179 | + foreach ( $query_result->getResults() as $wiki_page ) { |
| 180 | + $wiki_page->display_options = $display_options; |
199 | 181 | } |
200 | 182 | } |
201 | 183 | |