[Mapbender-commits] r2377 - branches/2.5/http/sld

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu Apr 10 19:07:30 EDT 2008


Author: mschulz
Date: 2008-04-10 19:07:30 -0400 (Thu, 10 Apr 2008)
New Revision: 2377

Modified:
   branches/2.5/http/sld/sld_function_handler.php
Log:
extracted function getusersld to new module

Modified: branches/2.5/http/sld/sld_function_handler.php
===================================================================
--- branches/2.5/http/sld/sld_function_handler.php	2008-04-10 23:06:36 UTC (rev 2376)
+++ branches/2.5/http/sld/sld_function_handler.php	2008-04-10 23:07:30 UTC (rev 2377)
@@ -29,14 +29,9 @@
  * @author Markus Krzyzanowski
  */
 
-
-//session_start();
 include_once(dirname(__FILE__)."/sld_config.php");
-
 include_once(dirname(__FILE__)."/../../conf/mapbender.conf");
 
-
-
 /**
  * This function saves the data into the database
  * @param string $data the content of the sld-document to be stored inside the database
@@ -68,10 +63,10 @@
 		$styledlayerdescriptor->generateObjectFromPost();
 		saveSld($styledlayerdescriptor->generateXml());
 	}
-	// the function "getusersld" is called by the mapserver to get the user's sld
+	/* the function "getusersld" is called by the mapserver to get the user's sld
 	else if ($_REQUEST["function"] == "getusersld")
 	{
-		if ( isset($_REQUEST["layer_id"]) && isset($_REQUEST["gui_id"]) && isset($_REQUEST["user_id"]) )
+		if ( isset($_REQUEST["sld_layer_id"]) && isset($_REQUEST["sld_gui_id"]) && isset($_REQUEST["user_id"]) )
 		{ //Used for the preview
 			$con = db_connect($DBSERVER,$OWNER,$PW);
 			db_select_db($DB,$con);
@@ -95,7 +90,7 @@
 			$con = db_connect($DBSERVER,$OWNER,$PW);
 			db_select_db($DB,$con);
 			
-			/*$sld_xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<StyledLayerDescriptor version=\"1.0.0\">\n";*/
+			#$sld_xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<StyledLayerDescriptor version=\"1.0.0\">\n";
 			$sld_xml = "<StyledLayerDescriptor version=\"1.0.0\" xmlns=\"http://www.opengis.net/sld\" xmlns:ogc=\"http://www.opengis.net/ogc\">\n";
 			
 			foreach ($layer_names as $layer_name)
@@ -127,7 +122,7 @@
 			$sld_xml .= "</StyledLayerDescriptor>";
 			echo $sld_xml;
 		} //Used for mapbender integration
-			else if ( isset($_REQUEST["wms_id"]) && isset($_REQUEST["gui_id"]) )
+			else if ( isset($_REQUEST["sld_wms_id"]) && isset($_REQUEST["sld_gui_id"]) )
 		{
 		
 			$con = db_connect($DBSERVER,$OWNER,$PW);
@@ -160,7 +155,7 @@
 			$sld_xml .= "</StyledLayerDescriptor>";
 			echo $sld_xml;
 		}
-	}
+	} */
 	// sets whether the user wishes to use a sld for this layer
 	else if ($_REQUEST["function"] == "usesld")
 	{



More information about the Mapbender_commits mailing list