diff --git a/phpgwapi/inc/class.error.inc.php b/phpgwapi/inc/class.error.inc.php index 0a9061b2ce..8f556164d8 100755 --- a/phpgwapi/inc/class.error.inc.php +++ b/phpgwapi/inc/class.error.inc.php @@ -37,7 +37,6 @@ function error($parms) { - global $phpgw; if ($parms == '') { return; @@ -61,17 +60,17 @@ $this->ismsg = $parms['ismsg']; $this->fname = $fname; $this->line = $line; - $this->app = $phpgw_info['flags']['currentapp']; + $this->app = $GLOBALS['phpgw_info']['flags']['currentapp']; if (!$this->fname or !$this->line) { - $phpgw->log->error(array( + $GLOBALS['phpgw']->log->error(array( 'text'=>'W-PGMERR, Programmer failed to pass __FILE__ and/or __LINE__ in next log message', 'file'=>__FILE__,'line'=>__LINE__ )); } - $phpgw->log->errorstack[] = $this; + $GLOBALS['phpgw']->log->errorstack[] = $this; if ($this->severity == 'F') { // This is it... Don't return @@ -81,11 +80,11 @@ echo "
"; echo "

Fatal Error

"; echo "

Error Stack

"; - echo $phpgw->log->astable(); + echo $GLOBALS['phpgw']->log->astable(); echo "
"; // Commit stack to log - $phpgw->log->commit(); - $phpgw->common->phpgw_exit(True); + $GLOBALS['phpgw']->log->commit(); + $GLOBALS['phpgw']->common->phpgw_exit(True); } } } diff --git a/phpgwapi/inc/class.errorlog.inc.php b/phpgwapi/inc/class.errorlog.inc.php index 5ba78e073d..675de5beac 100644 --- a/phpgwapi/inc/class.errorlog.inc.php +++ b/phpgwapi/inc/class.errorlog.inc.php @@ -104,14 +104,13 @@ function commit() { - global $phpgw, $phpgw_info; - $db = $phpgw->db; + $db = $GLOBALS['phpgw']->db; // $db->lock('phpgw_log'); $db->query ("insert into phpgw_log (log_date, log_user, log_app, log_severity) values " - ."('". $phpgw->db->to_timestamp(time() + ."('". $GLOBALS['phpgw']->db->to_timestamp(time() ) - ."','".$phpgw->session->account_id - ."','".$phpgw_info['flags']['currentapp']."'" + ."','".$GLOBALS['phpgw']->session->account_id + ."','".$GLOBALS['phpgw_info']['flags']['currentapp']."'" .",'".$this->severity()."'" .")" ,__LINE__,__FILE__); @@ -131,7 +130,7 @@ ."log_msg_code, log_msg_msg, log_msg_parms, log_msg_file, log_msg_line) values " ."(" . $log_id ."," . $i - .", '" . $phpgw->db->to_timestamp($err->timestamp + .", '" . $GLOBALS['phpgw']->db->to_timestamp($err->timestamp ) ."', '". $err->severity . "'" .", '". $err->code . "'" @@ -167,8 +166,6 @@ function astable() { - global $phpgw; - $html = "
\n"; $html .= "\n"; $html .= "\t\n"; @@ -197,7 +194,7 @@ $html .= "\t\n"; $html .= "\t\t\n"; - $html .= "\t\t\n"; + $html .= "\t\t\n"; $html .= "\t\t\n"; $html .= "\t\t\n"; $html .= "\t\t\n";
".$i."".$phpgw->common->show_date($err->timestamp)."".$GLOBALS['phpgw']->common->show_date($err->timestamp)."".$err->app."  ".$err->severity."".$err->code."