[QGIS Commit] r8302 - trunk/qgis/python/plugins/mapserver_export

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sun Mar 30 19:18:40 EDT 2008


Author: gsherman
Date: 2008-03-30 19:18:40 -0400 (Sun, 30 Mar 2008)
New Revision: 8302

Modified:
   trunk/qgis/python/plugins/mapserver_export/ms_export.py
Log:
Dont write FILTER keyword if the SQL filter doesn't exists

Modified: trunk/qgis/python/plugins/mapserver_export/ms_export.py
===================================================================
--- trunk/qgis/python/plugins/mapserver_export/ms_export.py	2008-03-30 14:18:38 UTC (rev 8301)
+++ trunk/qgis/python/plugins/mapserver_export/ms_export.py	2008-03-30 23:18:40 UTC (rev 8302)
@@ -308,7 +308,8 @@
         self.outFile.write("    CONNECTIONTYPE postgis\n")
         self.outFile.write("    CONNECTION '" + pgConnString + "'\n")
         self.outFile.write("    DATA '" + sqlData + "'\n")
-        self.outFile.write("    FILTER '" + sqlFilter + "'\n")
+        if sqlFilter:
+          self.outFile.write("    FILTER '" + sqlFilter + "'\n")
 
       elif providerString == 'wms' and lyr.getAttribute("type").encode('utf-8').upper() == 'RASTER':
         # it's a WMS layer 



More information about the QGIS-commit mailing list