2001-02-04 13:27:05 +01:00
|
|
|
<?php
|
2008-04-20 18:34:16 +02:00
|
|
|
/**
|
2010-09-05 17:24:34 +02:00
|
|
|
* EGroupware - API Setup
|
2008-04-20 18:34:16 +02:00
|
|
|
*
|
2014-06-24 12:00:50 +02:00
|
|
|
* Update scripts from 14.1 onwards
|
2008-04-20 18:34:16 +02:00
|
|
|
*
|
|
|
|
* @link http://www.egroupware.org
|
|
|
|
* @package api
|
|
|
|
* @subpackage setup
|
|
|
|
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
|
|
|
* @version $Id$
|
|
|
|
*/
|
2003-08-28 16:31:11 +02:00
|
|
|
|
2008-04-20 18:34:16 +02:00
|
|
|
/* Include older eGroupWare update support */
|
|
|
|
include('tables_update_0_9_9.inc.php');
|
|
|
|
include('tables_update_0_9_10.inc.php');
|
|
|
|
include('tables_update_0_9_12.inc.php');
|
|
|
|
include('tables_update_0_9_14.inc.php');
|
|
|
|
include('tables_update_1_0.inc.php');
|
|
|
|
include('tables_update_1_2.inc.php');
|
2008-11-24 11:51:59 +01:00
|
|
|
include('tables_update_1_4.inc.php');
|
2010-09-05 17:24:34 +02:00
|
|
|
include('tables_update_1_6.inc.php');
|
2014-06-24 12:00:50 +02:00
|
|
|
include('tables_update_1_8.inc.php');
|
2014-11-13 18:31:36 +01:00
|
|
|
|
|
|
|
function phpgwapi_upgrade14_1()
|
|
|
|
{
|
|
|
|
$GLOBALS['egw_setup']->oProc->CreateTable('egw_sharing',array(
|
|
|
|
'fd' => array(
|
|
|
|
'share_id' => array('type' => 'auto','nullable' => False,'comment' => 'auto-id'),
|
|
|
|
'share_token' => array('type' => 'varchar','precision' => '64','nullable' => False,'comment' => 'secure token'),
|
|
|
|
'share_path' => array('type' => 'varchar','precision' => '255','nullable' => False,'comment' => 'path to share'),
|
|
|
|
'share_owner' => array('type' => 'int','meta' => 'user','precision' => '4','nullable' => False,'comment' => 'owner of share'),
|
|
|
|
'share_expires' => array('type' => 'date','comment' => 'expire date of share'),
|
|
|
|
'share_writable' => array('type' => 'int','precision' => '1','nullable' => False,'default' => '0','comment' => '0=readable, 1=writable'),
|
|
|
|
'share_with' => array('type' => 'varchar','precision' => '4096','comment' => 'email addresses, comma seperated'),
|
|
|
|
'share_passwd' => array('type' => 'varchar','precision' => '128','comment' => 'optional password-hash'),
|
|
|
|
'share_created' => array('type' => 'timestamp','nullable' => False,'comment' => 'creation date'),
|
|
|
|
'share_last_accessed' => array('type' => 'timestamp','comment' => 'last access of share')
|
|
|
|
),
|
|
|
|
'pk' => array('share_id'),
|
|
|
|
'fk' => array(),
|
|
|
|
'ix' => array(),
|
|
|
|
'uc' => array('share_token')
|
|
|
|
));
|
|
|
|
|
|
|
|
return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '14.1.900';
|
|
|
|
}
|
|
|
|
|
2014-12-10 10:10:55 +01:00
|
|
|
/**
|
|
|
|
* Bump version to 14.2
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
function phpgwapi_upgrade14_1_900()
|
|
|
|
{
|
2015-02-04 14:15:11 +01:00
|
|
|
// Create anonymous user for sharing of files
|
|
|
|
$GLOBALS['egw_setup']->add_account('NoGroup', 'No', 'Rights', false, false);
|
|
|
|
$anonymous = $GLOBALS['egw_setup']->add_account('anonymous', 'SiteMgr', 'User', 'anonymous', 'NoGroup');
|
|
|
|
$GLOBALS['egw_setup']->add_acl('phpgwapi', 'anonymous', $anonymous);
|
|
|
|
|
2014-12-10 10:10:55 +01:00
|
|
|
return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '14.2';
|
2015-02-18 18:37:07 +01:00
|
|
|
}
|
|
|
|
function phpgwapi_upgrade14_2()
|
|
|
|
{
|
|
|
|
$GLOBALS['egw_setup']->oProc->AddColumn('egw_accounts','account_description',array(
|
|
|
|
'type' => 'varchar',
|
|
|
|
'precision' => '255',
|
|
|
|
'comment' => 'group description'
|
|
|
|
));
|
|
|
|
|
|
|
|
return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '15.0.001';
|
|
|
|
}
|
|
|
|
|