From ade66bd5333aef6c638092e65541362ff8f876eb Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 30 Apr 2006 12:21:11 +0000 Subject: [PATCH] fixed critical bug: a too long account-lid caused the complete lost of run-rigths from all user and groups --> beside fixing the real bug, I'm changing egw_accounts.account_lid to varchar(64) as varchar(25) was too small anyway --- phpgwapi/setup/setup.inc.php | 3 ++- phpgwapi/setup/tables_current.inc.php | 2 +- phpgwapi/setup/tables_update.inc.php | 20 ++++++++++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/phpgwapi/setup/setup.inc.php b/phpgwapi/setup/setup.inc.php index bc9bdd2b9c..38a5b5f5a5 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.003'; + $setup_info['phpgwapi']['version'] = '1.3.004'; $setup_info['phpgwapi']['versions']['current_header'] = '1.28'; $setup_info['phpgwapi']['enable'] = 3; $setup_info['phpgwapi']['app_order'] = 1; @@ -63,3 +63,4 @@ $setup_info['notifywindow']['hooks'][] = 'home'; + diff --git a/phpgwapi/setup/tables_current.inc.php b/phpgwapi/setup/tables_current.inc.php index 40017c676f..5afbaebf12 100644 --- a/phpgwapi/setup/tables_current.inc.php +++ b/phpgwapi/setup/tables_current.inc.php @@ -53,7 +53,7 @@ 'egw_accounts' => array( 'fd' => array( 'account_id' => array('type' => 'auto','nullable' => False), - 'account_lid' => array('type' => 'varchar','precision' => '25','nullable' => False), + 'account_lid' => array('type' => 'varchar','precision' => '64','nullable' => False), 'account_pwd' => array('type' => 'varchar','precision' => '100','nullable' => False), 'account_firstname' => array('type' => 'varchar','precision' => '50'), 'account_lastname' => array('type' => 'varchar','precision' => '50'), diff --git a/phpgwapi/setup/tables_update.inc.php b/phpgwapi/setup/tables_update.inc.php index fc9f0e3ffc..ba8fc322e9 100644 --- a/phpgwapi/setup/tables_update.inc.php +++ b/phpgwapi/setup/tables_update.inc.php @@ -39,6 +39,13 @@ return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.3.002'; } + $test[] = '1.2.101'; + function phpgwapi_upgrade1_2_101() + { + // 1. 1.2 bugfix-release: egw_accounts.account_lid is varchar(64) + return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.3.004'; + } + // updates in HEAD / 1.3 $test[] = '1.3.001'; function phpgwapi_upgrade1_3_001() @@ -76,4 +83,17 @@ return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.3.003'; } + + + $test[] = '1.3.003'; + function phpgwapi_upgrade1_3_003() + { + $GLOBALS['egw_setup']->oProc->AlterColumn('egw_accounts','account_lid',array( + 'type' => 'varchar', + 'precision' => '64', + 'nullable' => False + )); + + return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.3.004'; + } ?>