[Mapbender-commits] r7166 - trunk/mapbender/http/classes

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri Nov 26 05:17:26 EST 2010


Author: verenadiewald
Date: 2010-11-26 02:17:26 -0800 (Fri, 26 Nov 2010)
New Revision: 7166

Modified:
   trunk/mapbender/http/classes/class_point.php
Log:
transform function must have a transaction statement

Modified: trunk/mapbender/http/classes/class_point.php
===================================================================
--- trunk/mapbender/http/classes/class_point.php	2010-11-25 14:33:19 UTC (rev 7165)
+++ trunk/mapbender/http/classes/class_point.php	2010-11-26 10:17:26 UTC (rev 7166)
@@ -163,12 +163,14 @@
 		if(SYS_DBTYPE=='pgsql'){
 			$currentEpsg = preg_replace("/EPSG:/", "", $this->epsg);
 			$targetEpsg = preg_replace("/EPSG:/", "", $toEpsg);
+			db_begin();
 			$sql = "SELECT X(transform(GeometryFromText('POINT(".$this->x." ".$this->y.")',".$currentEpsg."),".$targetEpsg.")) as x, ";
 			$sql .= "Y(transform(GeometryFromText('POINT(".$this->x." ".$this->y.")',".$currentEpsg."),".$targetEpsg.")) as y, ";
 			if (isset($this->z)) {
 				$sql .= "Z(transform(GeometryFromText('POINT(".$this->x." ".$this->y." ".$this->z.")',".$currentEpsg."),".$targetEpsg.")) as z";
 			}
 			$res = db_query($sql);
+			db_commit();
 			if (isset($this->z)) {
 				$point = new Mapbender_point(db_result($res,0,"x"), db_result($res,0,"y"), db_result($res,0,"z"), $toEpsg);
 			}



More information about the Mapbender_commits mailing list