[fusion-commits] r1978 - trunk/widgets/Query/classes
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Tue Nov 17 01:22:02 EST 2009
Author: christinebao
Date: 2009-11-17 01:22:02 -0500 (Tue, 17 Nov 2009)
New Revision: 1978
Modified:
trunk/widgets/Query/classes/query.php
Log:
Fix ticket http://trac.osgeo.org/fusion/ticket/327.
Query: The matched objects excluded by layer filter are listed in Query result.
Modified: trunk/widgets/Query/classes/query.php
===================================================================
--- trunk/widgets/Query/classes/query.php 2009-11-17 03:05:46 UTC (rev 1977)
+++ trunk/widgets/Query/classes/query.php 2009-11-17 06:22:02 UTC (rev 1978)
@@ -209,8 +209,9 @@
$featureService = $this->site->CreateService(MgServiceType::FeatureService);
$resId = new MgResourceIdentifier($layer->GetFeatureSourceId());
$featureClass = $layer->GetFeatureClassName();
+ $filter = $layer->GetFilter();
$featureGeometry = $layer->GetFeatureGeometryName();
-
+
// Initialize the coordinate system transform
$schemaAndClass = explode(":", $featureClass);
@@ -240,6 +241,7 @@
$queryMax = (int) $this->args['QUERYMAX'];
$queryOptions = new MgFeatureQueryOptions();
+ $propertyFilter = '';
if ($this->args['USEPROPERTYFILTER'] == 'true')
{
$propertyFilter = $this->args['PROPERTYNAME'];
@@ -247,10 +249,18 @@
$propertyFilter .= sprintf($this->strExpressions[$this->args['OPERATOR']], $this->args['VALUE']);
else
$propertyFilter .= sprintf($this->numExpressions[$this->args['OPERATOR']], $this->args['VALUE']);
-
+
+ if($filter != '')
+ $propertyFilter = $propertyFilter . ' AND (' . $filter . ')';
+ }
+ else
+ {
+ if($filter != '')
+ $propertyFilter = $filter;
+ }
+ if($propertyFilter != '')
$queryOptions->SetFilter($propertyFilter);
- }
-
+
if ($this->args['USESPATIALFILTER'] == 'true')
{
$polygon = $this->CreatePolygonFromGeomText($this->args['GEOMTEXT']);
More information about the fusion-commits
mailing list