2006-11-16 12:05:42 +01:00
|
|
|
<?php
|
2010-09-05 17:24:34 +02:00
|
|
|
/**
|
|
|
|
* EGroupware - Setup
|
2011-06-07 13:21:59 +02:00
|
|
|
*
|
|
|
|
* @link http://www.egroupware.org
|
2010-09-05 17:24:34 +02:00
|
|
|
* Created by eTemplates DB-Tools written by ralfbecker@outdoor-training.de
|
|
|
|
*
|
|
|
|
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
|
|
|
* @package importexport
|
|
|
|
* @subpackage setup
|
|
|
|
* @version $Id: class.db_tools.inc.php 21408 2006-04-21 10:31:06Z nelius_weiss $
|
|
|
|
*/
|
2006-11-16 12:05:42 +01:00
|
|
|
|
2010-09-05 17:24:34 +02:00
|
|
|
function importexport_upgrade0_002()
|
|
|
|
{
|
|
|
|
$GLOBALS['egw_setup']->oProc->AddColumn('egw_importexport_definitions','description',array(
|
|
|
|
'type' => 'varchar',
|
|
|
|
'precision' => '255'
|
|
|
|
));
|
|
|
|
|
|
|
|
return $GLOBALS['setup_info']['importexport']['currentver'] = '0.003';
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function importexport_upgrade0_003()
|
|
|
|
{
|
|
|
|
return $GLOBALS['setup_info']['importexport']['currentver'] = '1.4';
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function importexport_upgrade1_4()
|
|
|
|
{
|
|
|
|
$sql = 'UPDATE egw_importexport_definitions SET plugin = CONCAT(application, "_", plugin)';
|
|
|
|
|
|
|
|
$GLOBALS['egw_setup']->db->query($sql, __LINE__, __FILE__);
|
|
|
|
return $GLOBALS['setup_info']['importexport']['currentver'] = '1.7.001';
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function importexport_upgrade1_7_001()
|
|
|
|
{
|
|
|
|
return $GLOBALS['setup_info']['importexport']['currentver'] = '1.8';
|
|
|
|
}
|
2011-02-03 19:09:39 +01:00
|
|
|
|
|
|
|
function importexport_upgrade1_8()
|
|
|
|
{
|
|
|
|
$GLOBALS['egw_setup']->oProc->AlterColumn('egw_importexport_definitions','definition_id',array(
|
|
|
|
'type' => 'auto',
|
|
|
|
'nullable' => False
|
|
|
|
));
|
|
|
|
$GLOBALS['egw_setup']->oProc->AddColumn('egw_importexport_definitions','modified',array(
|
|
|
|
'type' => 'timestamp'
|
|
|
|
));
|
|
|
|
|
|
|
|
return $GLOBALS['setup_info']['importexport']['currentver'] = '1.9.001';
|
|
|
|
}
|
|
|
|
|
2011-03-16 18:07:32 +01:00
|
|
|
function importexport_upgrade1_9_001()
|
|
|
|
{
|
2011-03-21 16:07:52 +01:00
|
|
|
// Not needed - did it wrong
|
2011-03-16 18:07:32 +01:00
|
|
|
return $GLOBALS['setup_info']['importexport']['currentver'] = '1.9.002';
|
|
|
|
}
|
2011-06-07 13:21:59 +02:00
|
|
|
|
2011-05-18 16:46:57 +02:00
|
|
|
function importexport_upgrade1_9_002()
|
|
|
|
{
|
|
|
|
$sql = 'UPDATE egw_importexport_definitions SET allowed_users = '.
|
2011-06-07 13:21:59 +02:00
|
|
|
$GLOBALS['egw_setup']->db->concat("','", 'allowed_users', "','");
|
|
|
|
$GLOBALS['egw_setup']->oProc->query($sql, __LINE__, __FILE__);
|
|
|
|
|
|
|
|
// give Default and Admins group rights for ImportExport
|
|
|
|
foreach(array('Default' => 'Default','Admins' => 'Admin') as $account_lid => $name)
|
|
|
|
{
|
|
|
|
$account_id = $GLOBALS['egw_setup']->add_account($account_lid,$name,'Group',False,False);
|
|
|
|
$GLOBALS['egw_setup']->add_acl('importexport','run',$account_id);
|
|
|
|
}
|
2011-05-18 16:46:57 +02:00
|
|
|
|
|
|
|
return $GLOBALS['setup_info']['importexport']['currentver'] = '1.9.003';
|
|
|
|
}
|