[fusion-commits] r1874 - trunk/layers/MapGuide/php

svn_fusion at osgeo.org svn_fusion at osgeo.org
Wed Jul 22 10:03:20 EDT 2009


Author: pagameba
Date: 2009-07-22 10:03:20 -0400 (Wed, 22 Jul 2009)
New Revision: 1874

Modified:
   trunk/layers/MapGuide/php/Query.php
Log:
re #229, close feature reader in both possibilities.

Modified: trunk/layers/MapGuide/php/Query.php
===================================================================
--- trunk/layers/MapGuide/php/Query.php	2009-07-21 21:54:28 UTC (rev 1873)
+++ trunk/layers/MapGuide/php/Query.php	2009-07-22 14:03:20 UTC (rev 1874)
@@ -203,13 +203,6 @@
                 echo $e->GetStackTrace() . "\n";
             }
 
-            //debug block
-            //$testSelection = new MgSelection($map);
-            //$testSelection->AddFeatures($layerObj, $featureReader, $maxFeatures);
-            //$featureReader->Close();
-            //echo "/* features selected:".$testSelection->ToXML()."*/";
-            //$featureReader = $featureService->SelectFeatures($featureResId, $class, $queryOptions);
-
             $layerName = $layerObj->GetName();
             array_push($properties->layers, $layerName);
 
@@ -217,6 +210,7 @@
                 /* possibly toggle features in the map */
                 $newSelection = new MgSelection($map);
                 $newSelection->AddFeatures($layerObj, $featureReader, $maxFeatures);
+                $featureReader->Close();
                 $aLayers = selectionToArray($newSelection, $aLayers);
             } else {
                 try {
@@ -257,16 +251,13 @@
 
                 /* 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,
                                                   $srsLayer, $bNeedsTransform, $layerObj);
             }
-
-             /* close the feature reader - not doing this could cause problems */
-            $featureReader->Close();
-
         } catch (MgObjectNotFoundException $onfe) {
             //skip layers not in the map?
             echo "Object not found";



More information about the fusion-commits mailing list