From f942605e3068c126bd04cfba38815695f0343707 Mon Sep 17 00:00:00 2001 From: skeeter Date: Sat, 11 Aug 2001 14:49:12 +0000 Subject: [PATCH] Defined the ->log in CreateObject() as a global, and moved the Actual CreateObject() for the log class to the very beginning of the class CreateObject list. --- phpgwapi/inc/functions.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phpgwapi/inc/functions.inc.php b/phpgwapi/inc/functions.inc.php index 14016a572a..d32fb5b8f2 100644 --- a/phpgwapi/inc/functions.inc.php +++ b/phpgwapi/inc/functions.inc.php @@ -48,9 +48,9 @@ { global $phpgw_info, $phpgw; - if (is_object($phpgw->log) && $class != 'phpgwapi.error' && $class != 'phpgwapi.errorlog') + if (is_object(@$GLOBALS['phpgw']->log) && $class != 'phpgwapi.error' && $class != 'phpgwapi.errorlog') { - //$phpgw->log->write(array('text'=>'D-Debug, dbg: %1','p1'=>'This class was run: '.$class,'file'=>__FILE__,'line'=>__LINE__)); + //$GLOBALS['phpgw']->log->write(array('text'=>'D-Debug, dbg: %1','p1'=>'This class was run: '.$class,'file'=>__FILE__,'line'=>__LINE__)); } /* error_reporting(0); */ @@ -470,6 +470,7 @@ /************************************************************************\ * Required classes * \************************************************************************/ + $GLOBALS['phpgw']->log = CreateObject('phpgwapi.errorlog'); $GLOBALS['phpgw']->common = CreateObject('phpgwapi.common'); $GLOBALS['phpgw']->hooks = CreateObject('phpgwapi.hooks'); $GLOBALS['phpgw']->auth = CreateObject('phpgwapi.auth'); @@ -479,7 +480,6 @@ $GLOBALS['phpgw']->preferences = CreateObject('phpgwapi.preferences'); $GLOBALS['phpgw']->applications = CreateObject('phpgwapi.applications'); $GLOBALS['phpgw']->translation = CreateObject('phpgwapi.translation'); - $GLOBALS['phpgw']->log = CreateObject('phpgwapi.errorlog'); // $GLOBALS['phpgw']->datetime = CreateObject('phpgwapi.datetime'); print_debug('main class loaded'); if (! isset($phpgw_info['flags']['included_classes']['error']) ||