deleted attributes were not completely recognized

This commit is contained in:
Roland Gruber 2006-09-03 12:29:44 +00:00
parent dc974ee7aa
commit 5753d4e55a
1 changed files with 8 additions and 1 deletions

View File

@ -1105,8 +1105,15 @@ class accountContainer {
$tomodify = array();
$torem = array();
$notchanged = array();
// Get list of all "easy" attributes
// get list of all attributes
$attr_names = array_keys($attributes);
$orig_names = array_keys($orig);
// find deleted attributes (in $orig but no longer in $attributes)
for ($i = 0; $i < sizeof($orig_names); $i++) {
if (!isset($attributes[$orig_names[$i]])) {
$torem[$orig_names[$i]] = $orig[$orig_names[$i]];
}
}
// find changed attributes
for ($i=0; $i<count($attr_names); $i++) {
// find deleted attributes