forked from extern/egroupware
Use only the phpgw_setup->oProc object
This commit is contained in:
parent
8e616003b6
commit
aaccb90b2e
@ -36,9 +36,8 @@
|
|||||||
*/
|
*/
|
||||||
function init_process()
|
function init_process()
|
||||||
{
|
{
|
||||||
$ConfigDomain = $GLOBALS['HTTP_COOKIE_VARS']['ConfigDomain'] ? $GLOBALS['HTTP_COOKIE_VARS']['ConfigDomain'] : $GLOBALS['HTTP_POST_VARS']['ConfigDomain'];
|
$ConfigDomain = get_var('ConfigDomain',array('COOKIE','POST'));
|
||||||
$phpgw_domain = $GLOBALS['phpgw_domain'];
|
$phpgw_domain = $GLOBALS['phpgw_domain'];
|
||||||
$phpgw_info = $GLOBALS['phpgw_info'];
|
|
||||||
|
|
||||||
$GLOBALS['phpgw_setup']->oProc = CreateObject('phpgwapi.schema_proc',$phpgw_domain[$ConfigDomain]['db_type']);
|
$GLOBALS['phpgw_setup']->oProc = CreateObject('phpgwapi.schema_proc',$phpgw_domain[$ConfigDomain]['db_type']);
|
||||||
$GLOBALS['phpgw_setup']->oProc->m_odb = $GLOBALS['phpgw_setup']->db;
|
$GLOBALS['phpgw_setup']->oProc->m_odb = $GLOBALS['phpgw_setup']->db;
|
||||||
@ -48,8 +47,6 @@
|
|||||||
$GLOBALS['phpgw_setup']->oProc->m_odb->Password = $phpgw_domain[$ConfigDomain]['db_pass'];
|
$GLOBALS['phpgw_setup']->oProc->m_odb->Password = $phpgw_domain[$ConfigDomain]['db_pass'];
|
||||||
$GLOBALS['phpgw_setup']->oProc->m_odb->Halt_On_Error = 'report';
|
$GLOBALS['phpgw_setup']->oProc->m_odb->Halt_On_Error = 'report';
|
||||||
$GLOBALS['phpgw_setup']->oProc->m_odb->connect();
|
$GLOBALS['phpgw_setup']->oProc->m_odb->connect();
|
||||||
/* Legacy - update table scripts */
|
|
||||||
$this->oProc = $GLOBALS['phpgw_setup']->oProc;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -184,7 +181,7 @@
|
|||||||
*/
|
*/
|
||||||
function droptables($setup_info,$DEBUG=False)
|
function droptables($setup_info,$DEBUG=False)
|
||||||
{
|
{
|
||||||
if (!$GLOBALS['phpgw_setup']->oProc)
|
if(!@$GLOBALS['phpgw_setup']->oProc)
|
||||||
{
|
{
|
||||||
$this->init_process();
|
$this->init_process();
|
||||||
}
|
}
|
||||||
@ -228,7 +225,7 @@
|
|||||||
*/
|
*/
|
||||||
function current($setup_info,$DEBUG=False)
|
function current($setup_info,$DEBUG=False)
|
||||||
{
|
{
|
||||||
if (!$GLOBALS['phpgw_setup']->oProc)
|
if(!@$GLOBALS['phpgw_setup']->oProc)
|
||||||
{
|
{
|
||||||
$this->init_process();
|
$this->init_process();
|
||||||
}
|
}
|
||||||
@ -310,12 +307,12 @@
|
|||||||
*/
|
*/
|
||||||
function default_records($setup_info,$DEBUG=False)
|
function default_records($setup_info,$DEBUG=False)
|
||||||
{
|
{
|
||||||
if (!$GLOBALS['phpgw_setup']->oProc)
|
if(!@$GLOBALS['phpgw_setup']->oProc)
|
||||||
{
|
{
|
||||||
$this->init_process();
|
$this->init_process();
|
||||||
}
|
}
|
||||||
$GLOBALS['phpgw_setup']->oProc->m_bDeltaOnly = False;
|
$GLOBALS['phpgw_setup']->oProc->m_bDeltaOnly = False;
|
||||||
$oProc = $GLOBALS['phpgw_setup']->oProc;
|
// $oProc = $GLOBALS['phpgw_setup']->oProc;
|
||||||
|
|
||||||
@reset($setup_info);
|
@reset($setup_info);
|
||||||
while(list($key,$null) = @each($setup_info))
|
while(list($key,$null) = @each($setup_info))
|
||||||
@ -419,12 +416,12 @@
|
|||||||
*/
|
*/
|
||||||
function test_data($setup_info,$DEBUG=False)
|
function test_data($setup_info,$DEBUG=False)
|
||||||
{
|
{
|
||||||
if (!$GLOBALS['phpgw_setup']->oProc)
|
if(!@$GLOBALS['phpgw_setup']->oProc)
|
||||||
{
|
{
|
||||||
$this->init_process();
|
$this->init_process();
|
||||||
}
|
}
|
||||||
$GLOBALS['phpgw_setup']->oProc->m_bDeltaOnly = False;
|
$GLOBALS['phpgw_setup']->oProc->m_bDeltaOnly = False;
|
||||||
$oProc = $GLOBALS['phpgw_setup']->oProc;
|
// $oProc = $GLOBALS['phpgw_setup']->oProc;
|
||||||
|
|
||||||
@reset($setup_info);
|
@reset($setup_info);
|
||||||
while(list($key,$null) = @each($setup_info))
|
while(list($key,$null) = @each($setup_info))
|
||||||
@ -455,7 +452,7 @@
|
|||||||
*/
|
*/
|
||||||
function baseline($setup_info,$DEBUG=False)
|
function baseline($setup_info,$DEBUG=False)
|
||||||
{
|
{
|
||||||
if (!$GLOBALS['phpgw_setup']->oProc)
|
if(!@$GLOBALS['phpgw_setup']->oProc)
|
||||||
{
|
{
|
||||||
$this->init_process();
|
$this->init_process();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user