[fusion-commits] r1463 - trunk/MapGuide/php
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Thu Aug 21 14:40:36 EDT 2008
Author: madair
Date: 2008-08-21 14:40:34 -0400 (Thu, 21 Aug 2008)
New Revision: 1463
Modified:
trunk/MapGuide/php/Query.php
trunk/MapGuide/php/Selection.php
Log:
closes #107: add check to see if layername is already in selection properties array; add check to see if selection properties layer array exists.
Modified: trunk/MapGuide/php/Query.php
===================================================================
--- trunk/MapGuide/php/Query.php 2008-08-21 13:57:06 UTC (rev 1462)
+++ trunk/MapGuide/php/Query.php 2008-08-21 18:40:34 UTC (rev 1463)
@@ -256,9 +256,7 @@
/* add the features to the map */
$selection->AddFeatures($layerObj, $featureReader, $maxFeatures);
- $featureReader->Close();
-
$featureReader = $featureService->SelectFeatures($featureResId, $class, $queryOptions);
$properties = BuildSelectionArray($featureReader, $layerName, $properties,
$bComputedProperties,
@@ -304,7 +302,9 @@
$selection->AddFeatures($oLayer, $featureReader, $maxFeatures);
$layerName = $oLayer->GetName();
- array_push($properties->layers, $layerName);
+ if (!in_array($layerName, $properties->layers)) {
+ array_push($properties->layers, $layerName);
+ }
$featureReader->Close();
$featureReader = $featureService->SelectFeatures($featureResId, $class, $queryOptions);
Modified: trunk/MapGuide/php/Selection.php
===================================================================
--- trunk/MapGuide/php/Selection.php 2008-08-21 13:57:06 UTC (rev 1462)
+++ trunk/MapGuide/php/Selection.php 2008-08-21 18:40:34 UTC (rev 1463)
@@ -33,7 +33,6 @@
include('../../common/php/Utilities.php');
include('Utilities.php');
-
$result = NULL;
$result->layers = array();
@@ -75,6 +74,7 @@
{
$layerName = $aSelectedLayers[$i];
if (($bAllLayers || in_array($layerName, $aLayers)) &&
+ isset($properties->$layerName) &&
$properties->$layerName->numelements > 0)
{
array_push($result->layers, $layerName);
More information about the fusion-commits
mailing list