diff --git a/phpgwapi/inc/class.error.inc.php b/phpgwapi/inc/class.error.inc.php index 8f556164d8..7ee81ab32d 100755 --- a/phpgwapi/inc/class.error.inc.php +++ b/phpgwapi/inc/class.error.inc.php @@ -32,8 +32,8 @@ // Translate Message into Language function langmsg() { - return lang($this->msg,$this->parms); - } + return lang($this->msg,$this->parms); + } function error($parms) { @@ -56,13 +56,13 @@ $this->msg = trim($etext); } $this->timestamp = time(); - $this->parms = $parray; - $this->ismsg = $parms['ismsg']; - $this->fname = $fname; - $this->line = $line; - $this->app = $GLOBALS['phpgw_info']['flags']['currentapp']; + $this->parms = $parray; + $this->ismsg = $parms['ismsg']; + $this->fname = $fname; + $this->line = $line; + $this->app = $GLOBALS['phpgw_info']['flags']['currentapp']; - if (!$this->fname or !$this->line) + if (!$this->fname or !$this->line) { $GLOBALS['phpgw']->log->error(array( 'text'=>'W-PGMERR, Programmer failed to pass __FILE__ and/or __LINE__ in next log message', diff --git a/phpgwapi/inc/class.errorlog.inc.php b/phpgwapi/inc/class.errorlog.inc.php index 3b55808963..135c05f90a 100644 --- a/phpgwapi/inc/class.errorlog.inc.php +++ b/phpgwapi/inc/class.errorlog.inc.php @@ -17,7 +17,7 @@ /***************************\ * Instance Variables... * \***************************/ - var $errorstack = array(); + var $errorstack = array(); var $public_functions = array( 'message', 'error', @@ -106,13 +106,14 @@ { $db = $GLOBALS['phpgw']->db; // $db->lock('phpgw_log'); - $db->query ("insert into phpgw_log (log_date, log_user, log_app, log_severity) values " - ."('". $GLOBALS['phpgw']->db->to_timestamp(time()) - ."','".$GLOBALS['phpgw']->session->account_id - ."','".$GLOBALS['phpgw_info']['flags']['currentapp']."'" - .",'".$this->severity()."'" - .")" - ,__LINE__,__FILE__); + $db->query("insert into phpgw_log (log_date, log_user, log_app, log_severity) values " + ."('". $GLOBALS['phpgw']->db->to_timestamp(time()) + ."','".$GLOBALS['phpgw']->session->account_id + ."','".$GLOBALS['phpgw_info']['flags']['currentapp']."'" + .",'".$this->severity()."'" + .")" + ,__LINE__,__FILE__ + ); $log_id = $db->get_last_insert_id('phpgw_log','log_id'); // $db->query('select max(log_id) as lid from phpgw_log'); @@ -124,21 +125,22 @@ for ($i = 0; $i < count($errorstack); $i++) { $err = $errorstack[$i]; - $db->query ("insert into phpgw_log_msg " - ."(Log_msg_log_id, log_msg_seq_no, log_msg_date, log_msg_severity, " - ."log_msg_code, log_msg_msg, log_msg_parms, log_msg_file, log_msg_line) values " - ."(" . $log_id - ."," . $i - .", '" . $GLOBALS['phpgw']->db->to_timestamp($err->timestamp) - ."', '". $err->severity . "'" - .", '". $err->code . "'" - .", '". $db->db_addslashes($err->msg) . "'" - .", '". $db->db_addslashes(implode('|',$err->parms)). "'" - .", '". $err->fname . "'" - .", " . intval($err->line) - .")" - ,__LINE__,__FILE__); - }; + $db->query("insert into phpgw_log_msg " + ."(Log_msg_log_id, log_msg_seq_no, log_msg_date, log_msg_severity, " + ."log_msg_code, log_msg_msg, log_msg_parms, log_msg_file, log_msg_line) values " + ."(" . $log_id + ."," . $i + .", '" . $GLOBALS['phpgw']->db->to_timestamp($err->timestamp) + ."', '". $err->severity . "'" + .", '". $err->code . "'" + .", '". $db->db_addslashes($err->msg) . "'" + .", '". $db->db_addslashes(implode('|',$err->parms)). "'" + .", '". $err->fname . "'" + .", " . intval($err->line) + .")" + ,__LINE__,__FILE__ + ); + } unset ($errorstack); unset ($this->errorstack); $this->errorstack = array(); @@ -160,7 +162,7 @@ unset ($this->errorstack); $this->errorstack = $new; return true; - } + } function astable() { @@ -200,7 +202,7 @@ $html .= "\t\t