[Mapbender-commits] r8234 - in trunk/mapbender/http: classes php

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Jan 23 03:18:59 EST 2012


Author: armin11
Date: 2012-01-23 00:18:59 -0800 (Mon, 23 Jan 2012)
New Revision: 8234

Modified:
   trunk/mapbender/http/classes/class_weldMaps2JPEG.php
   trunk/mapbender/http/php/mod_filteredGui_User.php
Log:
Bugfix and show user id as title when associate relation in gui->user.

Modified: trunk/mapbender/http/classes/class_weldMaps2JPEG.php
===================================================================
--- trunk/mapbender/http/classes/class_weldMaps2JPEG.php	2012-01-18 13:40:10 UTC (rev 8233)
+++ trunk/mapbender/http/classes/class_weldMaps2JPEG.php	2012-01-23 08:18:59 UTC (rev 8234)
@@ -49,6 +49,8 @@
 
 		for($i=0; $i<count($url); $i++){
 			if ($url[$i] != false) { //sometimes some false urls will be send? - don't use them
+				//before encode the url it should be decoded to be secure that a decoded url is used!
+				$url[$i] = urldecode($url[$i]);
 				$obj = new stripRequest($url[$i]);
 				$url[$i] = $obj->setPNG();
 				$url[$i] = $obj->encodeGET($encode);

Modified: trunk/mapbender/http/php/mod_filteredGui_User.php
===================================================================
--- trunk/mapbender/http/php/mod_filteredGui_User.php	2012-01-18 13:40:10 UTC (rev 8233)
+++ trunk/mapbender/http/php/mod_filteredGui_User.php	2012-01-23 08:18:59 UTC (rev 8234)
@@ -86,7 +86,8 @@
 			}
 		}
 		var newOption = new Option(selected?all[i]['name']+" ("+all[i]['email']+")":all[i]['name'],all[i]['id'],false,selected);
-		newOption.setAttribute("title", all[i]['email']);
+		var title = all[i]['id']+"#"+all[i]['email'];
+		newOption.setAttribute("title", title);
 		list.options[list.options.length] = newOption;
 	}	
 }
@@ -238,7 +239,7 @@
 echo "<div class='text2'>USER:</div>";
 echo "<select style='background:#ffffff' onchange='updateMail(this, user)' class='select2' multiple='multiple' id='selecteduser' name='selected_user[]' size='$fieldHeight' >";
 for($i=0; $i<$cnt_user; $i++){
-	echo "<option value='" . $user_id[$i]  . "' title='".$user_email[$i]."'>" . $user_name[$i]  . "</option>";
+	echo "<option value='" . $user_id[$i]  . "' title='".$user_id[$i]."#".$user_email[$i]."'>" . $user_name[$i]  . "</option>";
 }
 echo "</select>";
 /*Button*******************************************************************************************/
@@ -255,7 +256,7 @@
 echo "<div class='text3'>SELECTED USER:</div>";
 echo "<select style='background:#ffffff' onchange='updateMail(this, user)' class='select3' multiple='multiple' name='remove_user[]' id='removeuser' size='$fieldHeight' >";
 for($i=0; $i<$cnt_gui_user; $i++){
-	echo "<option value='" . $user_id_gui[$i]  . "' title='".$user_email_gui[$i]."'>" . $user_name_gui[$i]  . "</option>";
+	echo "<option value='" . $user_id_gui[$i]  . "' title='".$user_id[$i]."#".$user_email_gui[$i]."'>" . $user_name_gui[$i]  . "</option>";
 }
 echo "</select>";
 
@@ -286,4 +287,4 @@
 // -->
 </script>
 </body>
-</html>
\ No newline at end of file
+</html>



More information about the Mapbender_commits mailing list