Browse files

fixed bug in update

  • Loading branch information...
1 parent 18747e5 commit ec4fd483d8556c80d0cfcb7fb6b38249aa3d9bb6 @damko committed Mar 29, 2012
View
3 sparks/ri_contact_engine/0.0.1/models/location.php
@@ -141,7 +141,8 @@ public function update(array $input)
//if an attribute has been deleted then it's not contained in the $input.
//The only way to understand what's has been deleted is to compare the original entry value with the new ones
$deleted_attributes = array_diff_assoc($original_values, $entry);
- foreach ($deleted_attributes as $attribute => $value) {
+ foreach ($deleted_attributes as $attribute => $value) {
+ if($attribute=='objectClass' || $attribute=='entryCreatedBy') continue;
if(is_array($value)) {
$entry[$attribute] = array();
} else {
View
3 sparks/ri_contact_engine/0.0.1/models/organization.php
@@ -133,7 +133,8 @@ public function update(array $input = null)
//if an attribute has been deleted then it's not contained in the $input.
//The only way to understand what's has been deleted is to compare the original entry value with the new ones
$deleted_attributes = array_diff_assoc($original_values, $entry);
- foreach ($deleted_attributes as $attribute => $value) {
+ foreach ($deleted_attributes as $attribute => $value) {
+ if($attribute=='objectClass' || $attribute=='entryCreatedBy') continue;
if(is_array($value)) {
$entry[$attribute] = array();
} else {
View
1 sparks/ri_contact_engine/0.0.1/models/person.php
@@ -156,6 +156,7 @@ public function update(array $input = null)
//The only way to understand what's has been deleted is to compare the original entry value with the new ones
$deleted_attributes = array_diff_assoc($original_values, $entry);
foreach ($deleted_attributes as $attribute => $value) {
+ if($attribute=='objectClass' || $attribute=='entryCreatedBy') continue;
if(is_array($value)) {
$entry[$attribute] = array();
} else {

0 comments on commit ec4fd48

Please sign in to comment.