https://www.mediawiki.org/wiki/Special:Code/MediaWiki/114511
Revision: 114511
Author: yaron
Date: 2012-03-27 01:26:12 +0000 (Tue, 27 Mar 2012)
Log Message:
-----------
Removed support for SMW < 1.6
Modified Paths:
--------------
trunk/extensions/SemanticCompoundQueries/SCQ_QueryProcessor.php
Modified: trunk/extensions/SemanticCompoundQueries/SCQ_QueryProcessor.php
===================================================================
--- trunk/extensions/SemanticCompoundQueries/SCQ_QueryProcessor.php
2012-03-27 01:18:11 UTC (rev 114510)
+++ trunk/extensions/SemanticCompoundQueries/SCQ_QueryProcessor.php
2012-03-27 01:26:12 UTC (rev 114511)
@@ -156,24 +156,14 @@
if ( $result1 == null ) {
return $result2;
}
- $existing_page_names = array();
+ $existing_page_names = array();
foreach ( $result1 as $r1 ) {
- // SMW 1.6+
- if ( $r1 instanceof SMWDIWikiPage ) {
- $existing_page_names[] = $r1->getDBkey();
- } else {
- $existing_page_names[] = $r1->getWikiValue();
- }
+ $existing_page_names[] = $r1->getDBkey();
}
foreach ( $result2 as $r2 ) {
- if ( $r2 instanceof SMWDIWikiPage ) {
- $page_name = $r2->getDBkey();
- } else {
- $page_name = $r2->getWikiValue();
- }
-
+ $page_name = $r2->getDBkey();
if ( ! in_array( $page_name, $existing_page_names ) ) {
$result1[] = $r2;
}
@@ -243,8 +233,7 @@
if ( version_compare( SMW_VERSION, '1.6.1', '>' ) ) {
$format = $params['format'];
- }
- else {
+ } else {
$format = self::getResultFormat( $params );
}
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs