fixed PHP notice

This commit is contained in:
Roland Gruber 2010-06-16 17:22:47 +00:00
parent 23ca3b9e86
commit c85e718178
2 changed files with 24 additions and 16 deletions

View File

@ -1755,12 +1755,15 @@ class inetOrgPerson extends baseModule implements passwordService {
if (isset($attributes[$attrName]) && !isset($attributesNew[$attrName])) $return['del'][$attrName] = $attributes[$attrName];
elseif (!isset($attributes[$attrName]) && isset($attributesNew[$attrName])) $return['add'][$attrName] = $attributesNew[$attrName];
else {
if (isset($attributes[$attrName])) {
for ($a = 0; $a < sizeof($attributes[$attrName]); $a++) {
if (!in_array($attributes[$attrName][$a], $attributesNew[$attrName])) {
$return['mod'][$attrName] = $attributesNew[$attrName];
break;
}
}
}
if (isset($attributesNew[$attrName])) {
for ($a = 0; $a < sizeof($attributesNew[$attrName]); $a++) {
if (!in_array($attributesNew[$attrName][$a], $attributes[$attrName])) {
$return['mod'][$attrName] = $attributesNew[$attrName];
@ -1769,6 +1772,7 @@ class inetOrgPerson extends baseModule implements passwordService {
}
}
}
}
return $return;
}

View File

@ -1014,12 +1014,15 @@ class kolabUser extends baseModule {
$return['add'][$attrName] = $attributesNew[$attrName];
}
else {
if (isset($attributes[$attrName])) {
for ($a = 0; $a < sizeof($attributes[$attrName]); $a++) {
if (!in_array($attributes[$attrName][$a], $attributesNew[$attrName])) {
$return['mod'][$attrName] = $attributesNew[$attrName];
break;
}
}
}
if (isset($attributesNew[$attrName])) {
for ($a = 0; $a < sizeof($attributesNew[$attrName]); $a++) {
if (!in_array($attributesNew[$attrName][$a], $attributes[$attrName])) {
$return['mod'][$attrName] = $attributesNew[$attrName];
@ -1028,6 +1031,7 @@ class kolabUser extends baseModule {
}
}
}
}
return $return;
}