[Mapbender-commits] r1732 - branches/mapbender_sld/http/sld

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Oct 15 10:43:14 EDT 2007


Author: mschulz
Date: 2007-10-15 10:43:13 -0400 (Mon, 15 Oct 2007)
New Revision: 1732

Modified:
   branches/mapbender_sld/http/sld/sld_function_handler.php
Log:
add php function-call as gui_wms_sldurl when use_sld is activated

Modified: branches/mapbender_sld/http/sld/sld_function_handler.php
===================================================================
--- branches/mapbender_sld/http/sld/sld_function_handler.php	2007-10-15 14:32:14 UTC (rev 1731)
+++ branches/mapbender_sld/http/sld/sld_function_handler.php	2007-10-15 14:43:13 UTC (rev 1732)
@@ -141,16 +141,15 @@
 		{
 			$con = db_connect($DBSERVER,$OWNER,$PW);
 			db_select_db($DB,$con);
-			$sql = "UPDATE sld_user_layer SET use_sld=".$_REQUEST["use_sld"]." WHERE fkey_layer_id='".$_SESSION["sld_layer_id"]."' AND fkey_mb_user_id='".$_SESSION["mb_user_id"]."';";
+			$sql = "UPDATE sld_user_layer SET use_sld=".$_REQUEST["use_sld"]." WHERE fkey_gui_id='".$_SESSION["sld_gui_id"]."' AND fkey_layer_id='".$_SESSION["sld_layer_id"]."' AND fkey_mb_user_id='".$_SESSION["mb_user_id"]."';";
 			$res = db_query($sql);
 			
 			# update gui_wms_sldurl
-			if ($_REQUEST["use_sld"]=="1")
+			if ($_REQUEST["use_sld"]=="1") {
 				$sld_url = $_REQUEST["mb_sld_url"];
-			else
-				$sld_url = "";
-			$sql = "UPDATE gui_wms SET gui_wms_sldurl='".$sld_url."' WHERE fkey_gui_id='".$_SESSION["sld_gui_id"]."' AND fkey_wms_id=".$_SESSION["sld_wms_id"];
-			$res = db_query($sql); 
+				$sql = "UPDATE gui_wms SET gui_wms_sldurl='".$sld_url."' WHERE fkey_gui_id='".$_SESSION["sld_gui_id"]."' AND fkey_wms_id=".$_SESSION["sld_wms_id"];
+				$res = db_query($sql); 
+			}
 		}
 	}
 	



More information about the Mapbender_commits mailing list