Skip to content

Commit

Permalink
Remove virtual address book when search source is removed.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Mar 2, 2016
1 parent 4c19c07 commit 7286e9a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions turba/lib/Turba.php
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,16 @@ public static function getConfigFromShares(array $sources, $owner = false)
'strict' => $newSources[$params['source']]['strict'],
'use_shares' => false,
);
} else {
$notification->push(sprintf(
_("Removing the virtual address book \"%s\" because the parent source has disappeared."),
$shares[$name]->get('name')), 'horde.message'
);
try {
$injector->getInstance('Turba_Shares')->removeShare($shares[$name]);
} catch (Horde_Share_Exception $e) {
Horde::log($e, 'ERR');
}
}
}

Expand Down

0 comments on commit 7286e9a

Please sign in to comment.