svn commit: r391 - trunk/mapbender/http/php/mod_editElements.php

uli at osgeo.org uli at osgeo.org
Wed Jun 7 10:07:29 EDT 2006


Author: uli
Date: 2006-06-07 14:07:28+0000
New Revision: 391

Modified:
   trunk/mapbender/http/php/mod_editElements.php

Log:
bug fixed - lost element_vars

Modified: trunk/mapbender/http/php/mod_editElements.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/php/mod_editElements.php?view=diff&rev=391&p1=trunk/mapbender/http/php/mod_editElements.php&p2=trunk/mapbender/http/php/mod_editElements.php&r1=390&r2=391
==============================================================================
--- trunk/mapbender/http/php/mod_editElements.php	(original)
+++ trunk/mapbender/http/php/mod_editElements.php	2006-06-07 14:07:28+0000
@@ -167,10 +167,12 @@
 	# end permission-check -------------------------------------------------------------
 
 	if ($mySave == '1'){
-		$sql_vars = "SELECT * FROM gui_element_vars WHERE fkey_e_id = $1 AND fkey_gui_id = $2";
-		$v = array($e_id,$guiList1);
+		//copy element vars
+		$sql = "SELECT * FROM gui_element_vars WHERE fkey_e_id = $1 AND fkey_gui_id = $2";
+		$v = array($e_id,$_POST["originGuiOfSelectedElement"]);
 		$t = array('s','s');
-		$res_vars = db_prep_query($sql_vars,$v,$t);
+		$c = 0;
+		$res_vars = db_prep_query($sql,$v,$t);
 	
 		db_begin();
 		
@@ -199,12 +201,8 @@
 		}
 	
 		//copy element vars
-		$sql = "SELECT * FROM gui_element_vars WHERE fkey_e_id = $1 AND fkey_gui_id = $2";
-		$v = array($e_id,$_POST["originGuiOfSelectedElement"]);
-		$t = array('s','s');
-		$c = 0;
-		$res = db_prep_query($sql,$v,$t);
-		while($row = db_fetch_array($res)){	
+		
+		while($row = db_fetch_array($res_vars)){	
 			$sql = array();
 			$v = array();
 			$t = array();




More information about the Mapbender_commits mailing list