2001-02-04 13:27:05 +01:00
< ? php
2002-11-25 19:33:30 +01:00
/************************************************************************** \
2004-08-09 14:40:51 +02:00
* eGroupWare - Setup *
* http :// www . egroupware . org *
2002-11-25 19:33:30 +01:00
* -------------------------------------------- *
* This program is free software ; you can redistribute it and / or modify it *
* under the terms of the GNU General Public License as published by the *
* Free Software Foundation ; either version 2 of the License , or ( at your *
* option ) any later version . *
\ **************************************************************************/
2003-08-28 16:31:11 +02:00
// $Id$
// $Source$
2004-08-09 14:40:51 +02:00
/* Include older eGroupWare update support */
2003-07-21 17:45:49 +02:00
include ( 'tables_update_0_9_9.inc.php' );
include ( 'tables_update_0_9_10.inc.php' );
include ( 'tables_update_0_9_12.inc.php' );
2004-07-15 08:47:34 +02:00
include ( 'tables_update_0_9_14.inc.php' );
2001-06-01 12:22:27 +02:00
2004-07-31 16:17:32 +02:00
// updates from the stable 1.0.0 branch
2004-07-23 02:46:01 +02:00
$test [] = '1.0.0.001' ;
function phpgwapi_upgrade1_0_0_001 ()
{
2004-08-26 16:15:55 +02:00
$GLOBALS [ 'setup_info' ][ 'phpgwapi' ][ 'currentver' ] = '1.0.0.004' ;
2004-07-23 02:46:01 +02:00
return $GLOBALS [ 'setup_info' ][ 'phpgwapi' ][ 'currentver' ];
}
2004-07-31 16:17:32 +02:00
$test [] = '1.0.0.002' ;
function phpgwapi_upgrade1_0_0_002 ()
{
// identical to 1.0.0.001, only created to get a new version of the packages
return phpgwapi_upgrade1_0_0_001 ();
}
2004-08-07 20:38:43 +02:00
$test [] = '1.0.0.003' ;
function phpgwapi_upgrade1_0_0_003 ()
{
// identical to 1.0.0.001, only created to get a new version of the final 1.0 packages
return phpgwapi_upgrade1_0_0_001 ();
}
2004-08-22 13:21:25 +02:00
$test [] = '1.0.0.004' ;
function phpgwapi_upgrade1_0_0_004 ()
{
2004-08-26 16:15:55 +02:00
$GLOBALS [ 'phpgw_setup' ] -> oProc -> RenameColumn ( 'phpgw_async' , 'id' , 'async_id' );
$GLOBALS [ 'phpgw_setup' ] -> oProc -> RenameColumn ( 'phpgw_async' , 'next' , 'async_next' );
$GLOBALS [ 'phpgw_setup' ] -> oProc -> RenameColumn ( 'phpgw_async' , 'times' , 'async_times' );
$GLOBALS [ 'phpgw_setup' ] -> oProc -> RenameColumn ( 'phpgw_async' , 'method' , 'async_method' );
$GLOBALS [ 'phpgw_setup' ] -> oProc -> RenameColumn ( 'phpgw_async' , 'data' , 'async_data' );
$GLOBALS [ 'phpgw_setup' ] -> oProc -> RenameColumn ( 'phpgw_async' , 'account_id' , 'async_account_id' );
$GLOBALS [ 'setup_info' ][ 'phpgwapi' ][ 'currentver' ] = '1.0.1.001' ;
2004-08-22 13:21:25 +02:00
return $GLOBALS [ 'setup_info' ][ 'phpgwapi' ][ 'currentver' ];
}
2004-09-08 18:18:09 +02:00
$test [] = '1.0.0.005' ;
function phpgwapi_upgrade1_0_0_005 ()
{
// identical to 1.0.0.001, only created to get a new version of the bugfix release
return phpgwapi_upgrade1_0_0_004 ();
}
2004-08-22 13:21:25 +02:00
$test [] = '1.0.1.001' ;
function phpgwapi_upgrade1_0_1_001 ()
{
// removing the ACL entries of deleted accounts
$GLOBALS [ 'phpgw_setup' ] -> setup_account_object ();
if (( $all_accounts = $GLOBALS [ 'phpgw' ] -> accounts -> search ( array ( 'type' => 'both' ))))
{
$all_accounts = array_keys ( $all_accounts );
$GLOBALS [ 'phpgw_setup' ] -> oProc -> query ( " DELETE FROM phpgw_acl WHERE acl_account NOT IN ( " . implode ( ',' , $all_accounts ) . " ) " , __LINE__ , __FILE__ );
$GLOBALS [ 'phpgw_setup' ] -> oProc -> query ( " DELETE FROM phpgw_acl WHERE acl_appname='phpgw_group' AND acl_location NOT IN (' " . implode ( " ',' " , $all_accounts ) . " ') " , __LINE__ , __FILE__ );
}
$GLOBALS [ 'setup_info' ][ 'phpgwapi' ][ 'currentver' ] = '1.0.1.002' ;
return $GLOBALS [ 'setup_info' ][ 'phpgwapi' ][ 'currentver' ];
}
2004-07-23 02:46:01 +02:00
?>