[Mapbender-commits] r8578 - branches/2.7/http/php trunk/mapbender/http/php

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Mar 4 01:06:08 PST 2013


Author: verenadiewald
Date: 2013-03-04 01:06:06 -0800 (Mon, 04 Mar 2013)
New Revision: 8578

Modified:
   branches/2.7/http/php/mod_filteredUser_filteredGroup.php
   trunk/mapbender/http/php/mod_filteredUser_filteredGroup.php
Log:
fixed broken prepared statement for action "removing selected group"

Modified: branches/2.7/http/php/mod_filteredUser_filteredGroup.php
===================================================================
--- branches/2.7/http/php/mod_filteredUser_filteredGroup.php	2013-02-27 13:20:16 UTC (rev 8577)
+++ branches/2.7/http/php/mod_filteredUser_filteredGroup.php	2013-03-04 09:06:06 UTC (rev 8578)
@@ -158,9 +158,9 @@
 if($remove){
 	if(count($remove_group)>0){
 		for($i=0; $i<count($remove_group); $i++){
-			$sql_remove = "DELETE FROM mb_user_mb_group WHERE fkey_mb_group_id = $1 and fkey_mb_user_id = $2 AND fkey_mb_group_id = $2 AND (mb_user_mb_group_type = 1 or mb_user_mb_group_type IS NULL)";
-			$v = array($remove_group[$i],$selected_user);
-			$t = array('i','i');
+			$sql_remove = "DELETE FROM mb_user_mb_group WHERE fkey_mb_group_id = $1 and fkey_mb_user_id = $2 AND fkey_mb_group_id = $3 AND (mb_user_mb_group_type = 1 or mb_user_mb_group_type IS NULL)";
+			$v = array($remove_group[$i],$selected_user,$remove_group[$i]);
+			$t = array('i','i','i');
 			db_prep_query($sql_remove,$v,$t);
 		}
 	}

Modified: trunk/mapbender/http/php/mod_filteredUser_filteredGroup.php
===================================================================
--- trunk/mapbender/http/php/mod_filteredUser_filteredGroup.php	2013-02-27 13:20:16 UTC (rev 8577)
+++ trunk/mapbender/http/php/mod_filteredUser_filteredGroup.php	2013-03-04 09:06:06 UTC (rev 8578)
@@ -158,9 +158,9 @@
 if($remove){
 	if(count($remove_group)>0){
 		for($i=0; $i<count($remove_group); $i++){
-			$sql_remove = "DELETE FROM mb_user_mb_group WHERE fkey_mb_group_id = $1 and fkey_mb_user_id = $2 AND fkey_mb_group_id = $2 AND (mb_user_mb_group_type = 1 or mb_user_mb_group_type IS NULL)";
-			$v = array($remove_group[$i],$selected_user);
-			$t = array('i','i');
+			$sql_remove = "DELETE FROM mb_user_mb_group WHERE fkey_mb_group_id = $1 and fkey_mb_user_id = $2 AND fkey_mb_group_id = $3 AND (mb_user_mb_group_type = 1 or mb_user_mb_group_type IS NULL)";
+			$v = array($remove_group[$i],$selected_user,$remove_group[$i]);
+			$t = array('i','i','i');
 			db_prep_query($sql_remove,$v,$t);
 		}
 	}



More information about the Mapbender_commits mailing list