[fusion-commits] r1391 - in trunk/widgets: BufferPanel Search SelectWithin

svn_fusion at osgeo.org svn_fusion at osgeo.org
Tue May 6 15:15:55 EDT 2008


Author: madair
Date: 2008-05-06 15:15:55 -0400 (Tue, 06 May 2008)
New Revision: 1391

Modified:
   trunk/widgets/BufferPanel/Buffer.php
   trunk/widgets/Search/Search.php
   trunk/widgets/SelectWithin/SelectWithin.php
Log:
closes #54: closes feature reader when widgets are finished.

Modified: trunk/widgets/BufferPanel/Buffer.php
===================================================================
--- trunk/widgets/BufferPanel/Buffer.php	2008-05-06 18:55:40 UTC (rev 1390)
+++ trunk/widgets/BufferPanel/Buffer.php	2008-05-06 19:15:55 UTC (rev 1391)
@@ -282,9 +282,8 @@
                     }
                 }
                 while($features->ReadNext());
-
-                $features->Close();
             }
+            $features->Close();
         }
 
         if($merge)

Modified: trunk/widgets/Search/Search.php
===================================================================
--- trunk/widgets/Search/Search.php	2008-05-06 18:55:40 UTC (rev 1390)
+++ trunk/widgets/Search/Search.php	2008-05-06 19:15:55 UTC (rev 1391)
@@ -228,10 +228,20 @@
     }
     catch(MgException $ae)
     {
+        if($features)
+        {
+            // Close the feature reader
+            $features->Close();
+        }
         OnError($searchError, $ae->GetDetails());
     }
     catch(SearchError $e)
     {
+        if($features)
+        {
+            // Close the feature reader
+            $features->Close();
+        }
         OnError($e->title, $e->getMessage());
     }
 

Modified: trunk/widgets/SelectWithin/SelectWithin.php
===================================================================
--- trunk/widgets/SelectWithin/SelectWithin.php	2008-05-06 18:55:40 UTC (rev 1390)
+++ trunk/widgets/SelectWithin/SelectWithin.php	2008-05-06 19:15:55 UTC (rev 1391)
@@ -173,6 +173,7 @@
                 }
                 $geomColl->Add($geom);
             }
+            $features->Close();
         }
     }
     if($geomColl->GetCount() == 0)



More information about the fusion-commits mailing list