From 8e25d2e29c3856e4c1e5bf1e203decac0e390fda Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 13 Nov 2005 12:05:35 +0000 Subject: [PATCH] phpgw_addressbook(_extra) --> egw_addressbook(_extra) --- addressbook/inc/class.socontacts.inc.php | 4 ++-- phpgwapi/inc/class.contacts_ldap.inc.php | 2 +- phpgwapi/inc/class.contacts_sql.inc.php | 6 +++--- phpgwapi/setup/setup.inc.php | 6 +++--- phpgwapi/setup/tables_current.inc.php | 4 ++-- phpgwapi/setup/tables_update.inc.php | 10 ++++++++++ 6 files changed, 21 insertions(+), 11 deletions(-) diff --git a/addressbook/inc/class.socontacts.inc.php b/addressbook/inc/class.socontacts.inc.php index dc0d6f04d7..5e2db57995 100755 --- a/addressbook/inc/class.socontacts.inc.php +++ b/addressbook/inc/class.socontacts.inc.php @@ -31,7 +31,7 @@ class socontacts /** * @var string $extra_table name of customefields table */ - var $extra_table = 'phpgw_addressbook_extra'; + var $extra_table = 'egw_addressbook_extra'; /** * @var string $extra_id @@ -57,7 +57,7 @@ class socontacts { if($GLOBALS['egw_info']['server']['contact_repository'] == 'sql' || !isset($GLOBALS['egw_info']['server']['contact_repository'])) { - $this->somain =& CreateObject('etemplate.so_sql','phpgwapi','phpgw_addressbook'); + $this->somain =& CreateObject('etemplate.so_sql','phpgwapi','egw_addressbook'); } else { diff --git a/phpgwapi/inc/class.contacts_ldap.inc.php b/phpgwapi/inc/class.contacts_ldap.inc.php index 75ed5b4a7e..23bf969bee 100644 --- a/phpgwapi/inc/class.contacts_ldap.inc.php +++ b/phpgwapi/inc/class.contacts_ldap.inc.php @@ -39,7 +39,7 @@ var $ldap = ''; var $nextid = ''; var $std_table = ''; - var $ext_table = 'phpgw_addressbook_extra'; + var $ext_table = 'egw_addressbook_extra'; var $account_id; var $adr_types; diff --git a/phpgwapi/inc/class.contacts_sql.inc.php b/phpgwapi/inc/class.contacts_sql.inc.php index e700d7631f..2c3e711fd5 100644 --- a/phpgwapi/inc/class.contacts_sql.inc.php +++ b/phpgwapi/inc/class.contacts_sql.inc.php @@ -44,8 +44,8 @@ class contacts_ { var $db = ''; - var $std_table='phpgw_addressbook'; - var $ext_table='phpgw_addressbook_extra'; + var $std_table='egw_addressbook'; + var $ext_table='egw_addressbook_extra'; var $account_id = 0; var $total_records = 0; @@ -670,7 +670,7 @@ list($stock_fields,,$extra_fields) = $this->split_stock_and_extras($fields); // access, cat_id and tid can be in $fields now or as extra params - foreach(array('access','cat_id','tid') as $extra) + foreach(array('access','cat_id','tid','owner') as $extra) { if (!is_null($$extra)) { diff --git a/phpgwapi/setup/setup.inc.php b/phpgwapi/setup/setup.inc.php index abe62c80df..595201f330 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.0.1.028'; + $setup_info['phpgwapi']['version'] = '1.0.1.029'; $setup_info['phpgwapi']['versions']['current_header'] = '1.28'; $setup_info['phpgwapi']['enable'] = 3; $setup_info['phpgwapi']['app_order'] = 1; @@ -33,8 +33,8 @@ $setup_info['phpgwapi']['tables'][] = 'egw_lang'; $setup_info['phpgwapi']['tables'][] = 'egw_nextid'; $setup_info['phpgwapi']['tables'][] = 'egw_categories'; - $setup_info['phpgwapi']['tables'][] = 'phpgw_addressbook'; - $setup_info['phpgwapi']['tables'][] = 'phpgw_addressbook_extra'; + $setup_info['phpgwapi']['tables'][] = 'egw_addressbook'; + $setup_info['phpgwapi']['tables'][] = 'egw_addressbook_extra'; $setup_info['phpgwapi']['tables'][] = 'egw_log'; $setup_info['phpgwapi']['tables'][] = 'egw_log_msg'; $setup_info['phpgwapi']['tables'][] = 'egw_interserv'; diff --git a/phpgwapi/setup/tables_current.inc.php b/phpgwapi/setup/tables_current.inc.php index 3eb8da7a14..a6c58c07f4 100644 --- a/phpgwapi/setup/tables_current.inc.php +++ b/phpgwapi/setup/tables_current.inc.php @@ -189,7 +189,7 @@ 'ix' => array(array('cat_appname','cat_owner','cat_parent','cat_level')), 'uc' => array() ), - 'phpgw_addressbook' => array( + 'egw_addressbook' => array( 'fd' => array( 'id' => array('type' => 'auto','nullable' => False), 'lid' => array('type' => 'varchar','precision' => '32'), @@ -250,7 +250,7 @@ 'ix' => array(array('tid','owner','access','n_family','n_given','email'),array('tid','cat_id','owner','access','n_family','n_given','email')), 'uc' => array() ), - 'phpgw_addressbook_extra' => array( + 'egw_addressbook_extra' => array( 'fd' => array( 'contact_id' => array('type' => 'int','precision' => '4','nullable' => False), 'contact_owner' => array('type' => 'int','precision' => '8'), diff --git a/phpgwapi/setup/tables_update.inc.php b/phpgwapi/setup/tables_update.inc.php index 1c44ec9e9b..a8da66a5b7 100644 --- a/phpgwapi/setup/tables_update.inc.php +++ b/phpgwapi/setup/tables_update.inc.php @@ -897,4 +897,14 @@ return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.0.1.028'; } + + + $test[] = '1.0.1.028'; + function phpgwapi_upgrade1_0_1_028() + { + $GLOBALS['egw_setup']->oProc->RenameTable('phpgw_addressbook','egw_addressbook'); + $GLOBALS['egw_setup']->oProc->RenameTable('phpgw_addressbook_extra','egw_addressbook_extra'); + + return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.0.1.029'; + } ?>