Moved inclusion of extension classes after definition of extended class, for php5 (and 3 ;) )

This commit is contained in:
Miles Lott 2003-10-16 10:27:34 +00:00
parent cc385c5ab4
commit 7d999cd13c
2 changed files with 22 additions and 18 deletions

View File

@ -14,11 +14,7 @@
/* $Id$ */ /* $Id$ */
if (empty($GLOBALS['phpgw_info']['server']['db_type'])) /* db_type setup moved after the class below - milosch */
{
$GLOBALS['phpgw_info']['server']['db_type'] = 'mysql';
}
include(PHPGW_API_INC.'/class.db_'.$GLOBALS['phpgw_info']['server']['db_type'].'.inc.php');
/** /**
* Database abstraction library * Database abstraction library
@ -246,7 +242,7 @@
*/ */
function transaction_begin() function transaction_begin()
{ {
return True; return True;
} }
/** /**
@ -256,7 +252,7 @@
*/ */
function transaction_commit() function transaction_commit()
{ {
return True; return True;
} }
/** /**
@ -266,7 +262,7 @@
*/ */
function transaction_abort() function transaction_abort()
{ {
return True; return True;
} }
/** /**
@ -297,7 +293,6 @@
function unlock() function unlock()
{} {}
/** /**
* Get the number of rows affected by last update * Get the number of rows affected by last update
* *
@ -462,7 +457,7 @@
*/ */
function index_names() function index_names()
{ {
return array(); return array();
} }
/** /**
@ -552,4 +547,10 @@
return $table ? $this->table_definitions[$app][$table] : $this->table_definitions[$app]; return $table ? $this->table_definitions[$app][$table] : $this->table_definitions[$app];
} }
} }
if(empty($GLOBALS['phpgw_info']['server']['db_type']))
{
$GLOBALS['phpgw_info']['server']['db_type'] = 'mysql';
}
include(PHPGW_API_INC.'/class.db_'.$GLOBALS['phpgw_info']['server']['db_type'].'.inc.php');
?> ?>

View File

@ -5,7 +5,7 @@
* and Joseph Engo <jengo@phpgroupware.org> * * and Joseph Engo <jengo@phpgroupware.org> *
* and Ralf Becker <ralfbecker@outdoor-training.de> * * and Ralf Becker <ralfbecker@outdoor-training.de> *
* Copyright (C) 2000, 2001 Dan Kuykendall * * Copyright (C) 2000, 2001 Dan Kuykendall *
* Parts Copyright (C) 2003 Free Software Foundation Inc * * Parts Copyright (C) 2003 Free Software Foundation Inc *
* -------------------------------------------------------------------------* * -------------------------------------------------------------------------*
* This library is part of the phpGroupWare API * * This library is part of the phpGroupWare API *
* http://www.phpgroupware.org/api * * http://www.phpgroupware.org/api *
@ -25,11 +25,7 @@
/* $Id$ */ /* $Id$ */
if (empty($GLOBALS['phpgw_info']['server']['sessions_type'])) /* sessions_type setup moved after the class below - milosch */
{
$GLOBALS['phpgw_info']['server']['sessions_type'] = 'db';
}
include_once(PHPGW_API_INC.'/class.sessions_'.$GLOBALS['phpgw_info']['server']['sessions_type'].'.inc.php');
/** /**
* Session Management Libabray * Session Management Libabray
@ -1212,8 +1208,8 @@
{} {}
/** /**
* Remove stale sessions out of the database * Remove stale sessions out of the database
*/ */
function clean_sessions() function clean_sessions()
{} {}
@ -1301,3 +1297,10 @@
function total() function total()
{} {}
} }
if(empty($GLOBALS['phpgw_info']['server']['sessions_type']))
{
$GLOBALS['phpgw_info']['server']['sessions_type'] = 'db';
}
include_once(PHPGW_API_INC.'/class.sessions_'.$GLOBALS['phpgw_info']['server']['sessions_type'].'.inc.php');