From bdb67a03c6a3f754f83a44b2f8fa1f8479a4a747 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sat, 23 Oct 2010 08:39:14 +0000 Subject: [PATCH] remove groupdav_hooks, to readd it (it was copied from not accessible Stylite-EPL-10.1 branch) --- phpgwapi/inc/class.groupdav_hooks.inc.php | 97 ----------------------- 1 file changed, 97 deletions(-) delete mode 100644 phpgwapi/inc/class.groupdav_hooks.inc.php diff --git a/phpgwapi/inc/class.groupdav_hooks.inc.php b/phpgwapi/inc/class.groupdav_hooks.inc.php deleted file mode 100644 index a48a1147ba..0000000000 --- a/phpgwapi/inc/class.groupdav_hooks.inc.php +++ /dev/null @@ -1,97 +0,0 @@ - - * @copyright (c) 2010 by Ralf Becker - * @version $Id$ - */ - -/** - * GroupDAV hooks: eg. preferences - */ -class groupdav_hooks -{ - /** - * Show GroupDAV preferences link in preferences - * - * @param string|array $args - */ - public static function menus($args) - { - $appname = 'groupdav'; - $location = is_array($args) ? $args['location'] : $args; - - if ($location == 'preferences') - { - $file = array( - 'Preferences' => egw::link('/index.php','menuaction=preferences.uisettings.index&appname='.$appname), - ); - if ($location == 'preferences') - { - display_section($appname,$file); - } - else - { - display_sidebox($appname,lang('Preferences'),$file); - } - } - } - - /** - * populates $settings for the preferences - * - * @param array|string $hook_data - * @return array - */ - static function settings($hook_data) - { - $settings = array(); - - if ($hook_data['setup']) - { - $addressbooks = array(); - } - else - { - $user = $GLOBALS['egw_info']['user']['account_id']; - $addressbook_bo = new addressbook_bo(); - $addressbooks = $addressbook_bo->get_addressbooks(EGW_ACL_READ); - unset($addressbooks[$user]); // Use P for personal addressbook - unset($addressbooks[$user.'p']);// ignore (optional) private addressbook for now - } - $addressbooks = array( - 'P' => lang('Personal'), - 'G' => lang('Primary Group'), - //'U' => lang('Accounts'), // not yet working - 'O' => lang('All in one'), - 'A' => lang('All'), - ) + $addressbooks; - - // rewriting owner=0 to 'U', as 0 get's always selected by prefs - if (!isset($addressbooks[0])) - { - unset($addressbooks['U']); - } - else - { - unset($addressbooks[0]); - } - - $settings['add_default'] = array( - 'type' => 'multiselect', - 'label' => 'Addressbooks to sync with Apple clients', - 'name' => 'addressbook-home-set', - 'help' => 'Addressbooks for CardDAV attribute "addressbook-home-set".', - 'values' => $addressbooks, - 'xmlrpc' => True, - 'admin' => False, - 'default' => 'P', - ); - return $settings; - } -} \ No newline at end of file