mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 16:48:49 +01:00
moved InfoLog's link class and it's table into the api
This commit is contained in:
parent
691aa4d9dc
commit
b31e40e067
@ -14,7 +14,7 @@
|
|||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
include_once(EGW_INCLUDE_ROOT.'/infolog/inc/class.soinfolog.inc.php');
|
include_once(EGW_INCLUDE_ROOT.'/infolog/inc/class.soinfolog.inc.php');
|
||||||
include_once(EGW_INCLUDE_ROOT.'/infolog/inc/class.bolink.inc.php');
|
include_once(EGW_API_INC.'/class.bolink.inc.php');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class is the BO-layer of InfoLog, it also handles xmlrpc requests
|
* This class is the BO-layer of InfoLog, it also handles xmlrpc requests
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
include_once(EGW_INCLUDE_ROOT.'/infolog/inc/class.solink.inc.php');
|
include_once(EGW_API_INC.'/class.solink.inc.php');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* storage object / db-layer for InfoLog
|
* storage object / db-layer for InfoLog
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
$setup_info['infolog']['name'] = 'infolog';
|
$setup_info['infolog']['name'] = 'infolog';
|
||||||
$setup_info['infolog']['version'] = '1.0.1.001';
|
$setup_info['infolog']['version'] = '1.0.1.001';
|
||||||
$setup_info['infolog']['app_order'] = 5;
|
$setup_info['infolog']['app_order'] = 5;
|
||||||
$setup_info['infolog']['tables'] = array('egw_infolog','egw_infolog_extra','egw_links');
|
$setup_info['infolog']['tables'] = array('egw_infolog','egw_infolog_extra');
|
||||||
$setup_info['infolog']['enable'] = 1;
|
$setup_info['infolog']['enable'] = 1;
|
||||||
|
|
||||||
$setup_info['infolog']['author'] =
|
$setup_info['infolog']['author'] =
|
||||||
@ -63,11 +63,11 @@
|
|||||||
/* Dependencies for this app to work */
|
/* Dependencies for this app to work */
|
||||||
$setup_info['infolog']['depends'][] = array(
|
$setup_info['infolog']['depends'][] = array(
|
||||||
'appname' => 'phpgwapi',
|
'appname' => 'phpgwapi',
|
||||||
'versions' => Array('0.9.14','0.9.15','0.9.16','1.0.0','1.0.1')
|
'versions' => Array('1.0.1')
|
||||||
);
|
);
|
||||||
$setup_info['infolog']['depends'][] = array(
|
$setup_info['infolog']['depends'][] = array(
|
||||||
'appname' => 'etemplate',
|
'appname' => 'etemplate',
|
||||||
'versions' => Array('0.9.15','0.9.16','1.0.0')
|
'versions' => Array('1.0.0','1.0.1')
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
@ -41,22 +41,6 @@
|
|||||||
'ix' => array(array('info_owner','info_responsible','info_status','info_startdate'),array('info_id_parent','info_owner','info_responsible','info_status','info_startdate')),
|
'ix' => array(array('info_owner','info_responsible','info_status','info_startdate'),array('info_id_parent','info_owner','info_responsible','info_status','info_startdate')),
|
||||||
'uc' => array()
|
'uc' => array()
|
||||||
),
|
),
|
||||||
'egw_links' => array(
|
|
||||||
'fd' => array(
|
|
||||||
'link_id' => array('type' => 'auto','nullable' => False),
|
|
||||||
'link_app1' => array('type' => 'varchar','precision' => '25','nullable' => False),
|
|
||||||
'link_id1' => array('type' => 'varchar','precision' => '50','nullable' => False),
|
|
||||||
'link_app2' => array('type' => 'varchar','precision' => '25','nullable' => False),
|
|
||||||
'link_id2' => array('type' => 'varchar','precision' => '50','nullable' => False),
|
|
||||||
'link_remark' => array('type' => 'varchar','precision' => '50'),
|
|
||||||
'link_lastmod' => array('type' => 'int','precision' => '4','nullable' => False),
|
|
||||||
'link_owner' => array('type' => 'int','precision' => '4','nullable' => False)
|
|
||||||
),
|
|
||||||
'pk' => array('link_id'),
|
|
||||||
'fk' => array(),
|
|
||||||
'ix' => array(array('link_app1','link_id1','link_lastmod'),array('link_app2','link_id2','link_lastmod')),
|
|
||||||
'uc' => array()
|
|
||||||
),
|
|
||||||
'egw_infolog_extra' => array(
|
'egw_infolog_extra' => array(
|
||||||
'fd' => array(
|
'fd' => array(
|
||||||
'info_id' => array('type' => 'int','precision' => '4','nullable' => False),
|
'info_id' => array('type' => 'int','precision' => '4','nullable' => False),
|
||||||
|
@ -436,8 +436,11 @@
|
|||||||
|
|
||||||
$GLOBALS['phpgw_setup']->oProc->RenameTable('phpgw_infolog','egw_infolog');
|
$GLOBALS['phpgw_setup']->oProc->RenameTable('phpgw_infolog','egw_infolog');
|
||||||
$GLOBALS['phpgw_setup']->oProc->RenameTable('phpgw_infolog_extra','egw_infolog_extra');
|
$GLOBALS['phpgw_setup']->oProc->RenameTable('phpgw_infolog_extra','egw_infolog_extra');
|
||||||
|
// only rename links table, if it has not been moved into the API and therefor been already renamed by the API update
|
||||||
|
if ($GLOBALS['phpgw_setup']->oProc->GetTableDefinition('phpgw_links'))
|
||||||
|
{
|
||||||
$GLOBALS['phpgw_setup']->oProc->RenameTable('phpgw_links','egw_links');
|
$GLOBALS['phpgw_setup']->oProc->RenameTable('phpgw_links','egw_links');
|
||||||
|
}
|
||||||
$GLOBALS['setup_info']['infolog']['currentver'] = '1.0.1.001';
|
$GLOBALS['setup_info']['infolog']['currentver'] = '1.0.1.001';
|
||||||
return $GLOBALS['setup_info']['infolog']['currentver'];
|
return $GLOBALS['setup_info']['infolog']['currentver'];
|
||||||
}
|
}
|
||||||
|
1135
phpgwapi/inc/class.bolink.inc.php
Normal file
1135
phpgwapi/inc/class.bolink.inc.php
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**************************************************************************\
|
/**************************************************************************\
|
||||||
* eGroupWare - InfoLog Links *
|
* eGroupWare - eGroupWare Interapplication Links *
|
||||||
* http://www.egroupware.org *
|
* http://www.egroupware.org *
|
||||||
* Written by Ralf Becker <RalfBecker@outdoor-training.de> *
|
* Written by Ralf Becker <RalfBecker@outdoor-training.de> *
|
||||||
* -------------------------------------------- *
|
* -------------------------------------------- *
|
||||||
@ -13,9 +13,7 @@
|
|||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* generalized linking between entries of eGroupware apps - BO layer
|
* generalized linking between entries of eGroupware apps - SO layer
|
||||||
*
|
|
||||||
* This class is the SO-layer of the links
|
|
||||||
*
|
*
|
||||||
* Links have two ends each pointing to an entry, each entry is a double:
|
* Links have two ends each pointing to an entry, each entry is a double:
|
||||||
* - app app-name or directory-name of an egw application, eg. 'infolog'
|
* - app app-name or directory-name of an egw application, eg. 'infolog'
|
||||||
@ -23,7 +21,7 @@
|
|||||||
*
|
*
|
||||||
* All vars passed to this class get correct escaped to prevent query insertion.
|
* All vars passed to this class get correct escaped to prevent query insertion.
|
||||||
*
|
*
|
||||||
* @package infolog
|
* @package API
|
||||||
* @subpackage link
|
* @subpackage link
|
||||||
* @author RalfBecker-At-outdoor-training.de
|
* @author RalfBecker-At-outdoor-training.de
|
||||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||||
@ -41,7 +39,7 @@
|
|||||||
function solink( )
|
function solink( )
|
||||||
{
|
{
|
||||||
$this->db = clone($GLOBALS['egw']->db);
|
$this->db = clone($GLOBALS['egw']->db);
|
||||||
$this->db->set_app('infolog');
|
$this->db->set_app('phpgwapi');
|
||||||
$this->user = $GLOBALS['egw_info']['user']['account_id'];
|
$this->user = $GLOBALS['egw_info']['user']['account_id'];
|
||||||
}
|
}
|
||||||
|
|
@ -14,7 +14,7 @@
|
|||||||
/* Basic information about this app */
|
/* Basic information about this app */
|
||||||
$setup_info['phpgwapi']['name'] = 'phpgwapi';
|
$setup_info['phpgwapi']['name'] = 'phpgwapi';
|
||||||
$setup_info['phpgwapi']['title'] = 'phpgwapi';
|
$setup_info['phpgwapi']['title'] = 'phpgwapi';
|
||||||
$setup_info['phpgwapi']['version'] = '1.0.1.011';
|
$setup_info['phpgwapi']['version'] = '1.0.1.012';
|
||||||
$setup_info['phpgwapi']['versions']['current_header'] = '1.28';
|
$setup_info['phpgwapi']['versions']['current_header'] = '1.28';
|
||||||
$setup_info['phpgwapi']['enable'] = 3;
|
$setup_info['phpgwapi']['enable'] = 3;
|
||||||
$setup_info['phpgwapi']['app_order'] = 1;
|
$setup_info['phpgwapi']['app_order'] = 1;
|
||||||
@ -53,6 +53,7 @@
|
|||||||
$setup_info['phpgwapi']['tables'][] = 'egw_contentmap';
|
$setup_info['phpgwapi']['tables'][] = 'egw_contentmap';
|
||||||
$setup_info['phpgwapi']['tables'][] = 'egw_syncmldevinfo';
|
$setup_info['phpgwapi']['tables'][] = 'egw_syncmldevinfo';
|
||||||
$setup_info['phpgwapi']['tables'][] = 'egw_syncmlsummary';
|
$setup_info['phpgwapi']['tables'][] = 'egw_syncmlsummary';
|
||||||
|
$setup_info['phpgwapi']['tables'][] = 'egw_links';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -549,5 +549,21 @@
|
|||||||
'fk' => array(),
|
'fk' => array(),
|
||||||
'ix' => array(),
|
'ix' => array(),
|
||||||
'uc' => array()
|
'uc' => array()
|
||||||
)
|
),
|
||||||
|
'egw_links' => array(
|
||||||
|
'fd' => array(
|
||||||
|
'link_id' => array('type' => 'auto','nullable' => False),
|
||||||
|
'link_app1' => array('type' => 'varchar','precision' => '25','nullable' => False),
|
||||||
|
'link_id1' => array('type' => 'varchar','precision' => '50','nullable' => False),
|
||||||
|
'link_app2' => array('type' => 'varchar','precision' => '25','nullable' => False),
|
||||||
|
'link_id2' => array('type' => 'varchar','precision' => '50','nullable' => False),
|
||||||
|
'link_remark' => array('type' => 'varchar','precision' => '50'),
|
||||||
|
'link_lastmod' => array('type' => 'int','precision' => '4','nullable' => False),
|
||||||
|
'link_owner' => array('type' => 'int','precision' => '4','nullable' => False)
|
||||||
|
),
|
||||||
|
'pk' => array('link_id'),
|
||||||
|
'fk' => array(),
|
||||||
|
'ix' => array(array('link_app1','link_id1','link_lastmod'),array('link_app2','link_id2','link_lastmod')),
|
||||||
|
'uc' => array()
|
||||||
|
),
|
||||||
);
|
);
|
||||||
|
@ -543,4 +543,40 @@
|
|||||||
$GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.0.1.011';
|
$GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.0.1.011';
|
||||||
return $GLOBALS['setup_info']['phpgwapi']['currentver'];
|
return $GLOBALS['setup_info']['phpgwapi']['currentver'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$test[] = '1.0.1.011';
|
||||||
|
function phpgwapi_upgrade1_0_1_011()
|
||||||
|
{
|
||||||
|
// moving the egw_links table into the API
|
||||||
|
if ($GLOBALS['phpgw_setup']->oProc->GetTableDefinition('phpgw_links'))
|
||||||
|
{
|
||||||
|
// table exists with old name ==> rename it to new one
|
||||||
|
$GLOBALS['phpgw_setup']->oProc->RenameTable('phpgw_links','egw_links');
|
||||||
|
}
|
||||||
|
elseif (!$GLOBALS['phpgw_setup']->oProc->GetTableDefinition('egw_links'))
|
||||||
|
{
|
||||||
|
// table does not exist at all (infolog not installed) ==> create it
|
||||||
|
$GLOBALS['phpgw_setup']->oProc->CreateTable('egw_links',array(
|
||||||
|
'fd' => array(
|
||||||
|
'link_id' => array('type' => 'auto','nullable' => False),
|
||||||
|
'link_app1' => array('type' => 'varchar','precision' => '25','nullable' => False),
|
||||||
|
'link_id1' => array('type' => 'varchar','precision' => '50','nullable' => False),
|
||||||
|
'link_app2' => array('type' => 'varchar','precision' => '25','nullable' => False),
|
||||||
|
'link_id2' => array('type' => 'varchar','precision' => '50','nullable' => False),
|
||||||
|
'link_remark' => array('type' => 'varchar','precision' => '50'),
|
||||||
|
'link_lastmod' => array('type' => 'int','precision' => '4','nullable' => False),
|
||||||
|
'link_owner' => array('type' => 'int','precision' => '4','nullable' => False)
|
||||||
|
),
|
||||||
|
'pk' => array('link_id'),
|
||||||
|
'fk' => array(),
|
||||||
|
'ix' => array(array('link_app1','link_id1','link_lastmod'),array('link_app2','link_id2','link_lastmod')),
|
||||||
|
'uc' => array()
|
||||||
|
));
|
||||||
|
}
|
||||||
|
// move the link-configuration to the api
|
||||||
|
$GLOBALS['phpgw_setup']->oProc->query('UPDATE '.$GLOBALS['phpgw_setup']->config_table." SET config_app='phpgwapi' WHERE config_app='infolog' AND config_name IN ('link_pathes','send_file_ips')",__LINE__,__FILE__);
|
||||||
|
|
||||||
|
$GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.0.1.012';
|
||||||
|
return $GLOBALS['setup_info']['phpgwapi']['currentver'];
|
||||||
|
}
|
||||||
?>
|
?>
|
Loading…
Reference in New Issue
Block a user