Subversion Repositories ALCASAR

Rev

Rev 1884 | Rev 2016 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 1884 Rev 2010
Line 80... Line 80...
80
	//	if value differs from the sql value then update
80
	//	if value differs from the sql value then update
81
			else{
81
			else{
82
				if (isset($item_vals["$key"][$j]) && (isset($old_val) && $old_val !='') || $sql_attr=='Filter-Id'){
82
				if (isset($item_vals["$key"][$j]) && (isset($old_val) && $old_val !='') || $sql_attr=='Filter-Id'){
83
					$old_val = $item_vals["$key"][$j];
83
					$old_val = $item_vals["$key"][$j];
84
					$old_val = da_sql_escape_string($link, $old_val);
84
					$old_val = da_sql_escape_string($link, $old_val);
-
 
85
					#we keep the fourth bit of Filter-Id to warn user about administrator who read imputability logs.
-
 
86
                                        $val[3]=$old_val[3];
85
					$res = da_sql_query($link,$config,
87
					$res = da_sql_query($link,$config,
86
					"UPDATE $table SET value = '$val' WHERE $query_key = '$login' AND
88
					"UPDATE $table SET value = '$val' WHERE $query_key = '$login' AND
87
					attribute = '$sql_attr' AND value = '$old_val';");
89
					attribute = '$sql_attr' AND value = '$old_val';");
88
	
90
	
89
					if (!$res || !da_sql_affected_rows($link,$res,$config))
91
					if (!$res || !da_sql_affected_rows($link,$res,$config))