[Mapbender-commits] r3875 - in branches/2.5/http: classes php

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Apr 15 07:39:07 EDT 2009


Author: christoph
Date: 2009-04-15 07:39:07 -0400 (Wed, 15 Apr 2009)
New Revision: 3875

Modified:
   branches/2.5/http/classes/class_wmc.php
   branches/2.5/http/php/mod_loadwmc_server.php
Log:
http://trac.osgeo.org/mapbender/ticket/441

Modified: branches/2.5/http/classes/class_wmc.php
===================================================================
--- branches/2.5/http/classes/class_wmc.php	2009-04-14 15:52:41 UTC (rev 3874)
+++ branches/2.5/http/classes/class_wmc.php	2009-04-15 11:39:07 UTC (rev 3875)
@@ -216,7 +216,7 @@
 		$result = array();
 		if ($this->userId && $this->xml && $this->wmc_title) {
 			$sql = "INSERT INTO mb_user_wmc VALUES ($1, $2, $3, $4, $5)";
-			$v = array($this->wmc_id, $this->userId, $this->xml, $this->wmc_title, time());
+			$v = array($this->wmc_id, $this->userId, $this->xml, administration::convertOutgoingString($this->wmc_title), time());
 			$t = array("s", "i", "s", "s", "s");
 			
 			$res = db_prep_query($sql, $v, $t);
@@ -915,6 +915,11 @@
 			$currentMapIsOverview = true;
 		}
 
+		if (is_null($currentMap)) {
+			$e = new mb_exception('class_wmc.php: setLayerData: $currentMap is null. Aborting.');
+			return null;
+		}
+
 		$wmsArray = $currentMap->getWmsArray();
 
 		//

Modified: branches/2.5/http/php/mod_loadwmc_server.php
===================================================================
--- branches/2.5/http/php/mod_loadwmc_server.php	2009-04-14 15:52:41 UTC (rev 3874)
+++ branches/2.5/http/php/mod_loadwmc_server.php	2009-04-15 11:39:07 UTC (rev 3875)
@@ -3,6 +3,7 @@
 require_once(dirname(__FILE__) . "/../classes/class_user.php");
 require_once(dirname(__FILE__) . "/../classes/class_wmc.php");
 require_once(dirname(__FILE__) . "/../classes/class_json.php");
+require_once(dirname(__FILE__) . "/../classes/class_administration.php");
 
 /**
  * encodes and delivers the data
@@ -57,7 +58,7 @@
 	while($row = db_fetch_array($res)){
 		$currentResult = array();
 		$currentResult["id"] = $row["wmc_id"];
-		$currentResult["title"] = $row["wmc_title"];
+		$currentResult["title"] = administration::convertIncomingString($row["wmc_title"]);
 		$currentResult["timestamp"] = date("M d Y H:i:s", $row["wmc_timestamp"]); 
 		array_push($wmcArray, $currentResult);
 	}



More information about the Mapbender_commits mailing list