From 4cfc20459ed1201fb3bb3ad5cf4b83bb1fb460e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cornelius=20Wei=C3=9F?= Date: Tue, 14 Mar 2006 13:34:43 +0000 Subject: [PATCH] addressbook extension: Admin can now define multiple addressbooks each with an own edit / view template and an own icon. Atm. all Addressbooks are stored in one backend, but this will change soon^tm --- phpgwapi/setup/setup.inc.php | 3 ++- phpgwapi/setup/tables_current.inc.php | 2 +- phpgwapi/setup/tables_update.inc.php | 30 ++++++++++++++++++++++++++- 3 files changed, 32 insertions(+), 3 deletions(-) diff --git a/phpgwapi/setup/setup.inc.php b/phpgwapi/setup/setup.inc.php index 157cc84711..ea7baee283 100755 --- a/phpgwapi/setup/setup.inc.php +++ b/phpgwapi/setup/setup.inc.php @@ -14,7 +14,7 @@ /* Basic information about this app */ $setup_info['phpgwapi']['name'] = 'phpgwapi'; $setup_info['phpgwapi']['title'] = 'eGroupWare API'; - $setup_info['phpgwapi']['version'] = '1.3.002'; + $setup_info['phpgwapi']['version'] = '1.3.003'; $setup_info['phpgwapi']['versions']['current_header'] = '1.28'; $setup_info['phpgwapi']['enable'] = 3; $setup_info['phpgwapi']['app_order'] = 1; @@ -64,3 +64,4 @@ $setup_info['notifywindow']['tables'] = ''; $setup_info['notifywindow']['hooks'][] = 'home'; + diff --git a/phpgwapi/setup/tables_current.inc.php b/phpgwapi/setup/tables_current.inc.php index bab869af20..68abe0f8f4 100644 --- a/phpgwapi/setup/tables_current.inc.php +++ b/phpgwapi/setup/tables_current.inc.php @@ -247,7 +247,7 @@ ), 'pk' => array('id'), 'fk' => array(), - 'ix' => array(array('tid','owner','access','n_family','n_given','email'),array('tid','cat_id','owner','access','n_family','n_given','email')), + 'ix' => array(array('tid','owner','access','n_family','n_given'),array('tid','cat_id','owner','access','n_family')), 'uc' => array() ), 'egw_addressbook_extra' => array( diff --git a/phpgwapi/setup/tables_update.inc.php b/phpgwapi/setup/tables_update.inc.php index 80234a3c8b..07da60ccb1 100644 --- a/phpgwapi/setup/tables_update.inc.php +++ b/phpgwapi/setup/tables_update.inc.php @@ -24,7 +24,7 @@ { return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.3.001'; } - + $test[] = '1.2.008'; function phpgwapi_upgrade1_2_008() { @@ -41,4 +41,32 @@ return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.3.002'; } + + $test[] = '1.3.002'; + function phpgwapi_upgrade1_3_002() + { + /*************************************************************************\ + * add addressbook-type contact into type definition table * + \*************************************************************************/ + if ($GLOBALS['DEBUG']) + { + echo "
\ninitiating to create the default type 'contact' for addressbook"; + } + + $newconf = array('n' => array( + 'name' => 'contact', + 'options' => array( + 'template' => 'addressbook.edit', + 'icon' => 'navbar.png' + ))); + $GLOBALS['egw_setup']->oProc->query("INSERT INTO egw_config (config_app,config_name,config_value) VALUES ('addressbook','types','". serialize($newconf). "')",__LINE__,__FILE__); + + if ($GLOBALS['DEBUG']) + { + echo " DONE!"; + } + /*************************************************************************/ + + return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.3.003'; + } ?>