* * See the enclosed file COPYING for license information (GPL). If you did not * receive this file, see http://www.fsf.org/copyleft/gpl.html. */ define('TURBA_BASE', dirname(__FILE__)); require_once TURBA_BASE . '/lib/base.php'; require_once TURBA_BASE . '/lib/Source.php'; $source = Util::getFormData('source'); $driver = &Turba_Source::singleton($source, $cfgSources[$source]); $key = Util::getFormData('key'); if ($driver->removeObject($key)) { if (!empty($_SESSION['turba_search_results'])) { require_once TURBA_BASE . '/lib/List.php'; require_once TURBA_BASE . '/lib/Object.php'; $list = Turba_List::unserialize($_SESSION['turba_search_results']); $list->remove($key); $_SESSION['turba_search_results'] = $list->serialize(); } if (Util::getFormData('url')) { header('Location: ' . Util::getFormData('url')); } else { header('Location: ' . Horde::url($prefs->getValue('initial_page'), true)); } } else { $notification->push(_("There was an error deleting this contact. Ask your system administrator for further help."), 'horde.error'); $title = _("Deletion failed"); require TURBA_TEMPLATES . '/common-header.inc'; Turba::menu(); require $registry->getParam('templates', 'horde') . '/common-footer.inc'; }