http://www.mediawiki.org/wiki/Special:Code/MediaWiki/73610
Revision: 73610
Author: yaron
Date: 2010-09-23 17:36:24 +0000 (Thu, 23 Sep 2010)
Log Message:
-----------
Improved documentation, added property_exists() check
Modified Paths:
--------------
trunk/extensions/SemanticCompoundQueries/SCQ_QueryResult.php
Modified: trunk/extensions/SemanticCompoundQueries/SCQ_QueryResult.php
===================================================================
--- trunk/extensions/SemanticCompoundQueries/SCQ_QueryResult.php
2010-09-23 17:34:29 UTC (rev 73609)
+++ trunk/extensions/SemanticCompoundQueries/SCQ_QueryResult.php
2010-09-23 17:36:24 UTC (rev 73610)
@@ -12,8 +12,8 @@
class SCQQueryResult extends SMWQueryResult {
/**
- * Adds a result, and ensures it's uniqueness by building a
- * list of pages already in the query result first.
+ * Adds in the pages from a new query result to the existing set of
+ * pages - only pages that weren't in the set already get added.
*
* @param SMWQueryResult $new_result
*/
@@ -28,7 +28,9 @@
}
while ( ( $row = $newResult->getNext() ) !== false ) {
- $row[0]->display_options = $newResult->display_options;
+ if ( property_exists( $newResult, 'display_options' ) )
{
+ $row[0]->display_options =
$newResult->display_options;
+ }
$content = $row[0]->getContent();
$pageName = $content[0]->getLongText( SMW_OUTPUT_WIKI );
@@ -40,4 +42,4 @@
reset( $this->m_content );
}
-}
\ No newline at end of file
+}
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs