Index: trunk/extensions/SemanticCompoundQueries/SCQ_QueryProcessor.php |
— | — | @@ -137,11 +137,20 @@ |
138 | 138 | $existing_page_names = array(); |
139 | 139 | |
140 | 140 | foreach ( $result1 as $r1 ) { |
141 | | - $existing_page_names[] = $r1->getWikiValue(); |
| 141 | + // SMW 1.6+ |
| 142 | + if ( $r1 instanceof SMWDIWikiPage ) { |
| 143 | + $existing_page_names[] = $r1->getDBkey(); |
| 144 | + } else { |
| 145 | + $existing_page_names[] = $r1->getWikiValue(); |
| 146 | + } |
142 | 147 | } |
143 | 148 | |
144 | 149 | foreach ( $result2 as $r2 ) { |
145 | | - $page_name = $r2->getWikiValue(); |
| 150 | + if ( $r1 instanceof SMWDIWikiPage ) { |
| 151 | + $page_name = $r2->getDBkey(); |
| 152 | + } else { |
| 153 | + $page_name = $r2->getWikiValue(); |
| 154 | + } |
146 | 155 | |
147 | 156 | if ( ! in_array( $page_name, $existing_page_names ) ) { |
148 | 157 | $result1[] = $r2; |