Subversion Repositories ALCASAR

Rev

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

Rev 2010 Rev 2016
Line 77... Line 77...
77
	//	if value is null or equals the default value then don't add it
77
	//	if value is null or equals the default value then don't add it
78
			else if (isset($default_vals["$key"]) && ($val == '' || check_defaults($val,$op_val,$default_vals["$key"])))
78
			else if (isset($default_vals["$key"]) && ($val == '' || check_defaults($val,$op_val,$default_vals["$key"])))
79
				continue;
79
				continue;
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 attribute not set, we create it. 
-
 
83
                                if(!isset($old_val) && $sql_attr=='Filter-Id')
-
 
84
                                {
-
 
85
                                        $res = da_sql_query($link,$config,"UPDATE $table SET value = '$val' WHERE $query_key = '$login' AND attribute = '$sql_attr' AND value = '';");
-
 
86
                                        if (!$res || !da_sql_affected_rows($link,$res,$config))
-
 
87
                                                echo "<b>Change failed for attribute $key: " . da_sql_error($link,$config) . "</b><br>\n";
-
 
88
                                }
-
 
89
			
82
				if (isset($item_vals["$key"][$j]) && (isset($old_val) && $old_val !='') || $sql_attr=='Filter-Id'){
90
				if (isset($item_vals["$key"][$j]) && (isset($old_val) && $old_val !='') || $sql_attr=='Filter-Id'){
83
					$old_val = $item_vals["$key"][$j];
91
					$old_val = $item_vals["$key"][$j];
84
					$old_val = da_sql_escape_string($link, $old_val);
92
					$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.
93
					#we keep the fourth bit of Filter-Id to warn user about administrator who read imputability logs.
86
                                        $val[3]=$old_val[3];
94
                                        $val[3]=$old_val[3];