From: Jan Schneider Date: Fri, 9 Apr 2010 13:36:54 +0000 (+0200) Subject: MFB: Remove deleted list contacts from the same address book too. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=1ca59d026c65ea733abbaa569704eff245116716;p=horde.git MFB: Remove deleted list contacts from the same address book too. --- diff --git a/turba/docs/CHANGES b/turba/docs/CHANGES index 642fce34c..4913ba7ae 100644 --- a/turba/docs/CHANGES +++ b/turba/docs/CHANGES @@ -10,6 +10,7 @@ v3.0-git v2.3.4-cvs ---------- +[jan] Remove deleted contacts from distribution lists in the same address book. [mjr] Allow creation of default, personal address book when other read-only sources are present. [mjr] Log deletion in History when deleting all of a user's contacts diff --git a/turba/lib/Object/Group.php b/turba/lib/Object/Group.php index 501ed86e5..4f6dbe79d 100644 --- a/turba/lib/Object/Group.php +++ b/turba/lib/Object/Group.php @@ -166,6 +166,7 @@ class Turba_Object_Group extends Turba_Object { // Remove the contact if it no longer exists $this->removeMember($member); $modified = true; + continue; } } else { list($sourceId, $contactId) = explode(':', $member, 2); @@ -177,6 +178,9 @@ class Turba_Object_Group extends Turba_Object { if (!is_a($driver, 'PEAR_Error')) { $contact = $driver->getObject($contactId); if (is_a($contact, 'PEAR_Error')) { + // Remove the contact if it no longer exists + $this->removeMember($member); + $modified = true; continue; } } else {