2001-02-04 13:27:05 +01:00
|
|
|
<?php
|
|
|
|
/**************************************************************************\
|
|
|
|
* phpGroupWare - Setup *
|
|
|
|
* http://www.phpgroupware.org *
|
|
|
|
* -------------------------------------------- *
|
|
|
|
* 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 *
|
2001-02-13 11:53:18 +01:00
|
|
|
* Free Software Foundation; either version 2 of the License, or (at your *
|
2001-02-04 13:27:05 +01:00
|
|
|
* option) any later version. *
|
|
|
|
\**************************************************************************/
|
2001-07-05 09:38:52 +02:00
|
|
|
|
2002-01-08 04:28:04 +01:00
|
|
|
/* $Id$ */
|
2001-06-01 12:22:27 +02:00
|
|
|
|
2002-01-08 04:28:04 +01:00
|
|
|
/* Include older phpGroupWare update support */
|
|
|
|
include($appdir . 'tables_update_0_9_9.inc.php');
|
|
|
|
include($appdir . 'tables_update_0_9_10.inc.php');
|
|
|
|
include($appdir . 'tables_update_0_9_12.inc.php');
|
2002-02-17 20:31:50 +01:00
|
|
|
include($appdir . 'tables_update_0_9_14.inc.php');
|
2001-06-01 12:22:27 +02:00
|
|
|
|
2002-01-08 04:28:04 +01:00
|
|
|
/* This is since the last release */
|
2002-03-01 12:30:59 +01:00
|
|
|
$test[] = '0.9.13.018';
|
|
|
|
function phpgwapi_upgrade0_9_13_018()
|
2001-10-17 05:43:56 +02:00
|
|
|
{
|
2002-02-17 20:31:50 +01:00
|
|
|
$GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.15.001';
|
2001-10-17 05:43:56 +02:00
|
|
|
return $GLOBALS['setup_info']['phpgwapi']['currentver'];
|
|
|
|
}
|
2001-11-26 00:32:16 +01:00
|
|
|
|
2002-02-17 20:31:50 +01:00
|
|
|
$test[] = '0.9.14';
|
|
|
|
function phpgwapi_upgrade0_9_14()
|
2001-11-26 00:32:16 +01:00
|
|
|
{
|
2002-02-17 20:31:50 +01:00
|
|
|
$GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.15.001';
|
2001-11-26 00:32:16 +01:00
|
|
|
return $GLOBALS['setup_info']['phpgwapi']['currentver'];
|
|
|
|
}
|
2002-01-02 16:26:19 +01:00
|
|
|
|
2002-08-26 09:51:54 +02:00
|
|
|
$test[] = '0.9.14.000';
|
|
|
|
function phpgwapi_upgrade0_9_14_000()
|
|
|
|
{
|
|
|
|
$GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.15.001';
|
|
|
|
return $GLOBALS['setup_info']['phpgwapi']['currentver'];
|
|
|
|
}
|
|
|
|
|
2002-02-17 20:31:50 +01:00
|
|
|
$test[] = '0.9.15.001';
|
|
|
|
function phpgwapi_upgrade0_9_15_001()
|
2002-01-02 16:26:19 +01:00
|
|
|
{
|
2002-02-17 20:31:50 +01:00
|
|
|
$GLOBALS['phpgw_setup']->oProc->RenameTable('lang','phpgw_lang');
|
|
|
|
$GLOBALS['phpgw_setup']->oProc->RenameTable('languages','phpgw_languages');
|
2002-01-02 17:03:34 +01:00
|
|
|
|
2002-02-17 20:31:50 +01:00
|
|
|
$GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.15.002';
|
2002-01-13 20:52:47 +01:00
|
|
|
return $GLOBALS['setup_info']['phpgwapi']['currentver'];
|
|
|
|
}
|
2002-05-20 00:52:34 +02:00
|
|
|
|
|
|
|
$test[] = '0.9.15.002';
|
|
|
|
function phpgwapi_upgrade0_9_15_002()
|
|
|
|
{
|
|
|
|
$GLOBALS['phpgw_setup']->oProc->CreateTable(
|
|
|
|
'phpgw_newprefs', array(
|
|
|
|
'fd' => array(
|
|
|
|
'preference_owner' => array('type' => 'int', 'precision' => 4, 'nullable' => False),
|
|
|
|
'preference_value' => array('type' => 'text')
|
|
|
|
),
|
|
|
|
'pk' => array('preference_owner'),
|
|
|
|
'fk' => array(),
|
|
|
|
'ix' => array(),
|
|
|
|
'uc' => array()
|
|
|
|
)
|
|
|
|
);
|
|
|
|
|
|
|
|
$GLOBALS['phpgw_setup']->oProc->query('SELECT * FROM phpgw_preferences',__LINE__,__FILE__);
|
|
|
|
$db2 = $GLOBALS['phpgw_setup']->db;
|
|
|
|
|
|
|
|
while($GLOBALS['phpgw_setup']->oProc->next_record())
|
|
|
|
{
|
|
|
|
$accountid = $GLOBALS['phpgw_setup']->oProc->f('preference_owner');
|
|
|
|
settype($accountid,'integer');
|
|
|
|
|
|
|
|
$db2->query('INSERT INTO phpgw_newprefs (preference_owner,preference_value) VALUES('
|
|
|
|
. $accountid . ",'"
|
2002-08-26 09:51:54 +02:00
|
|
|
. $GLOBALS['phpgw_setup']->oProc->f('preference_value') . "')",
|
2002-05-20 00:52:34 +02:00
|
|
|
__LINE__,__FILE__);
|
|
|
|
}
|
|
|
|
|
|
|
|
$GLOBALS['phpgw_setup']->oProc->DropTable('phpgw_preferences');
|
|
|
|
$GLOBALS['phpgw_setup']->oProc->RenameTable('phpgw_newprefs','phpgw_preferences');
|
|
|
|
|
|
|
|
$setup_info['phpgwapi']['currentver'] = '0.9.15.003';
|
|
|
|
return $setup_info['phpgwapi']['currentver'];
|
|
|
|
}
|
2002-08-26 06:38:29 +02:00
|
|
|
|
|
|
|
$test[] = '0.9.15.003';
|
|
|
|
function phpgwapi_upgrade0_9_15_003()
|
|
|
|
{
|
|
|
|
$GLOBALS['phpgw_setup']->oProc->AddColumn('phpgw_vfs','content', array ('type' => 'text', 'nullable' => False));
|
|
|
|
|
|
|
|
$GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.15.004';
|
|
|
|
return $GLOBALS['setup_info']['phpgwapi']['currentver'];
|
|
|
|
}
|
2002-09-01 15:00:39 +02:00
|
|
|
|
|
|
|
$test[] = '0.9.15.004';
|
|
|
|
function phpgwapi_upgrade0_9_15_004()
|
|
|
|
{
|
|
|
|
$GLOBALS['phpgw_setup']->db->query("UPDATE phpgw_languages set available='Yes' WHERE lang_id='pl'");
|
|
|
|
|
|
|
|
$GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.15.005';
|
|
|
|
return $GLOBALS['setup_info']['phpgwapi']['currentver'];
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|