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$
|
|
|
|
|
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');
|
2006-03-08 22:39:21 +01:00
|
|
|
include('tables_update_1_0.inc.php');
|
2001-06-01 12:22:27 +02:00
|
|
|
|
2006-03-08 22:39:21 +01:00
|
|
|
// updates from the stable 1.2 branch
|
|
|
|
$test[] = '1.2.007';
|
|
|
|
function phpgwapi_upgrade1_2_007()
|
2004-07-23 02:46:01 +02:00
|
|
|
{
|
2006-03-08 22:39:21 +01:00
|
|
|
return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.3.001';
|
2006-01-08 10:03:01 +01:00
|
|
|
}
|
2006-03-14 14:34:43 +01:00
|
|
|
|
2006-03-14 11:55:37 +01:00
|
|
|
$test[] = '1.2.008';
|
|
|
|
function phpgwapi_upgrade1_2_008()
|
|
|
|
{
|
|
|
|
// fixing the lang change from zt -> zh-tw for existing installations
|
|
|
|
return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.3.002';
|
|
|
|
}
|
|
|
|
|
2006-04-11 11:15:17 +02:00
|
|
|
$test[] = '1.2.100';
|
|
|
|
function phpgwapi_upgrade1_2_100()
|
|
|
|
{
|
|
|
|
// final 1.2 release
|
|
|
|
return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.3.002';
|
|
|
|
}
|
|
|
|
|
2006-04-30 14:21:11 +02:00
|
|
|
$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';
|
|
|
|
}
|
|
|
|
|
2006-06-01 22:04:05 +02:00
|
|
|
$test[] = '1.2.102';
|
|
|
|
function phpgwapi_upgrade1_2_102()
|
|
|
|
{
|
|
|
|
// 2. 1.2 bugfix-release: egw_accesslog.sessionid is varchar(128)
|
|
|
|
return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.3.004';
|
|
|
|
}
|
|
|
|
|
2006-03-14 11:55:37 +01:00
|
|
|
// updates in HEAD / 1.3
|
|
|
|
$test[] = '1.3.001';
|
|
|
|
function phpgwapi_upgrade1_3_001()
|
|
|
|
{
|
|
|
|
// fixing the lang change from zt -> zh-tw for existing installations
|
|
|
|
$GLOBALS['egw_setup']->db->update('egw_languages',array('lang_id' => 'zh-tw'),array('lang_id' => 'zt'),__LINE__,__FILE__);
|
|
|
|
|
|
|
|
return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.3.002';
|
|
|
|
}
|
2006-03-14 14:34:43 +01:00
|
|
|
|
|
|
|
$test[] = '1.3.002';
|
|
|
|
function phpgwapi_upgrade1_3_002()
|
|
|
|
{
|
|
|
|
/*************************************************************************\
|
|
|
|
* add addressbook-type contact into type definition table *
|
|
|
|
\*************************************************************************/
|
|
|
|
if ($GLOBALS['DEBUG'])
|
|
|
|
{
|
|
|
|
echo "<br>\n<b>initiating 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!</b>";
|
|
|
|
}
|
|
|
|
/*************************************************************************/
|
|
|
|
|
|
|
|
return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.3.003';
|
|
|
|
}
|
2006-04-30 14:21:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
$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';
|
|
|
|
}
|
2006-05-26 03:47:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
$test[] = '1.3.004';
|
|
|
|
function phpgwapi_upgrade1_3_004()
|
|
|
|
{
|
|
|
|
$GLOBALS['egw_setup']->oProc->AlterColumn('egw_vfs','vfs_created',array(
|
|
|
|
'type' => 'timestamp',
|
|
|
|
'nullable' => False,
|
|
|
|
'default' => 'current_timestamp'
|
|
|
|
));
|
|
|
|
$GLOBALS['egw_setup']->oProc->AlterColumn('egw_vfs','vfs_modified',array(
|
|
|
|
'type' => 'timestamp'
|
|
|
|
));
|
|
|
|
$GLOBALS['egw_setup']->oProc->AlterColumn('egw_vfs','vfs_content',array(
|
|
|
|
'type' => 'blob'
|
|
|
|
));
|
|
|
|
|
|
|
|
return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.3.005';
|
|
|
|
}
|
2006-06-01 22:04:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
$test[] = '1.3.005';
|
|
|
|
function phpgwapi_upgrade1_3_005()
|
|
|
|
{
|
|
|
|
$GLOBALS['egw_setup']->oProc->AlterColumn('egw_access_log','sessionid',array(
|
|
|
|
'type' => 'char',
|
|
|
|
'precision' => '128',
|
|
|
|
'nullable' => False
|
|
|
|
));
|
|
|
|
|
|
|
|
return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.3.006';
|
|
|
|
}
|
2006-01-06 06:05:20 +01:00
|
|
|
?>
|