Index: trunk/extensions/SemanticCompoundQueries/SCQ_QueryProcessor.php |
— | — | @@ -24,7 +24,7 @@ |
25 | 25 | for ( $i = 0; $i < strlen( $param ); $i++ ) { |
26 | 26 | $c = $param[$i]; |
27 | 27 | if ( ( $c == ';' ) && ( $uncompleted_square_brackets <= 0 ) ) { |
28 | | - $sub_params[] = trim($sub_param); |
| 28 | + $sub_params[] = trim( $sub_param ); |
29 | 29 | $sub_param = ""; |
30 | 30 | } else { |
31 | 31 | $sub_param .= $c; |
— | — | @@ -34,7 +34,7 @@ |
35 | 35 | $uncompleted_square_brackets--; |
36 | 36 | } |
37 | 37 | } |
38 | | - $sub_params[] = trim($sub_param); |
| 38 | + $sub_params[] = trim( $sub_param ); |
39 | 39 | return $sub_params; |
40 | 40 | } |
41 | 41 | |
— | — | @@ -56,8 +56,8 @@ |
57 | 57 | if ( strpos( $param, '[' ) !== false ) { |
58 | 58 | $sub_params = SCQQueryProcessor::getSubParams( $param ); |
59 | 59 | $next_result = SCQQueryProcessor::getQueryResultFromFunctionParams( $sub_params, SMW_OUTPUT_WIKI ); |
60 | | - if (method_exists($next_result, 'getResults')) { // SMW 1.5+ |
61 | | - $results = self::mergeSMWQueryResults($results, $next_result->getResults()); |
| 60 | + if ( method_exists( $next_result, 'getResults' ) ) { // SMW 1.5+ |
| 61 | + $results = self::mergeSMWQueryResults( $results, $next_result->getResults() ); |
62 | 62 | } else { |
63 | 63 | if ( $query_result == null ) |
64 | 64 | $query_result = new SCQQueryResult( $next_result->getPrintRequests(), new SMWQuery() ); |
— | — | @@ -70,7 +70,7 @@ |
71 | 71 | } |
72 | 72 | } |
73 | 73 | } |
74 | | - if ( is_null($query_result) ) // SMW 1.5+ |
| 74 | + if ( is_null( $query_result ) ) // SMW 1.5+ |
75 | 75 | $query_result = new SCQQueryResult( $next_result->getPrintRequests(), new SMWQuery(), $results, smwfGetStore() ); |
76 | 76 | $result = SCQQueryProcessor::getResultFromQueryResult( $query_result, $other_params, null, SMW_OUTPUT_WIKI ); |
77 | 77 | } else { |
— | — | @@ -93,12 +93,12 @@ |
94 | 94 | return $result2; |
95 | 95 | } |
96 | 96 | $existing_page_names = array(); |
97 | | - foreach ($result1 as $r1) { |
| 97 | + foreach ( $result1 as $r1 ) { |
98 | 98 | $existing_page_names[] = $r1->getWikiValue(); |
99 | 99 | } |
100 | | - foreach ($result2 as $r2) { |
| 100 | + foreach ( $result2 as $r2 ) { |
101 | 101 | $page_name = $r2->getWikiValue(); |
102 | | - if (! in_array($page_name, $existing_page_names)) { |
| 102 | + if ( ! in_array( $page_name, $existing_page_names ) ) { |
103 | 103 | $result1[] = $r2; |
104 | 104 | } |
105 | 105 | } |
— | — | @@ -138,8 +138,8 @@ |
139 | 139 | } else { |
140 | 140 | $display_options[$key] = $value; |
141 | 141 | } |
142 | | - if ( method_exists($query_result, 'getResults') ) { // SMW 1.5+ |
143 | | - foreach ($query_result->getResults() as $wiki_page) { |
| 142 | + if ( method_exists( $query_result, 'getResults' ) ) { // SMW 1.5+ |
| 143 | + foreach ( $query_result->getResults() as $wiki_page ) { |
144 | 144 | $wiki_page->display_options = $display_options; |
145 | 145 | } |
146 | 146 | } else { |