[mapserver-commits] r9062 - in branches/branch-5-4/mapserver: . mapscript/php3

svn at osgeo.org svn at osgeo.org
Tue Jun 2 08:38:20 EDT 2009


Author: dmorissette
Date: 2009-06-02 08:38:19 -0400 (Tue, 02 Jun 2009)
New Revision: 9062

Modified:
   branches/branch-5-4/mapserver/HISTORY.TXT
   branches/branch-5-4/mapserver/mapscript/php3/mapscript_i.c
Log:
Fix MapScript whichShapes() to respect filters AND return all items (#2689)

Modified: branches/branch-5-4/mapserver/HISTORY.TXT
===================================================================
--- branches/branch-5-4/mapserver/HISTORY.TXT	2009-06-02 04:17:18 UTC (rev 9061)
+++ branches/branch-5-4/mapserver/HISTORY.TXT	2009-06-02 12:38:19 UTC (rev 9062)
@@ -14,6 +14,8 @@
 Current Version:
 ----------------
 
+- Fix MapScript whichShapes() to respect filters AND return all items (#2689)
+
 - Fix error when saving the MAXLENGTH parameter (#3031)
 
 - Test database connections before using them (#2932)
@@ -26,8 +28,7 @@
 
 - Fix memory leak in SQL building (#2997)
 
-- Change the dll mapping rules to support the recent MONO versions 
-(#3019)
+- Change the dll mapping rules to support the recent MONO versions (#3019)
 
 - Added CURL_CA_BUNDLE env. var. to enable using HTTPS services in WMS/WFS
   client connections (#3007)

Modified: branches/branch-5-4/mapserver/mapscript/php3/mapscript_i.c
===================================================================
--- branches/branch-5-4/mapserver/mapscript/php3/mapscript_i.c	2009-06-02 04:17:18 UTC (rev 9061)
+++ branches/branch-5-4/mapserver/mapscript/php3/mapscript_i.c	2009-06-02 12:38:19 UTC (rev 9062)
@@ -401,11 +401,16 @@
 
 
 int layerObj_whichShapes(layerObj *self, rectObj *poRect) {
-  /* 
-  ** We assume folks use this like a simple query so retrieve all items with each shape.
-  */
-  if(msLayerWhichItems(self, MS_TRUE, MS_FALSE, NULL) != MS_SUCCESS) return MS_FAILURE;
-  return msLayerWhichShapes(self, *poRect);
+    int oldconnectiontype = self->connectiontype;
+    self->connectiontype = MS_INLINE;
+
+    if(msLayerWhichItems(self, MS_TRUE, MS_FALSE, NULL) != MS_SUCCESS) {
+        self->connectiontype = oldconnectiontype;
+        return MS_FAILURE;
+    }
+    self->connectiontype = oldconnectiontype;
+
+    return msLayerWhichShapes(self, *poRect);
 }
 
 



More information about the mapserver-commits mailing list