forked from extern/egroupware
formatting
This commit is contained in:
parent
cc3247e481
commit
0d1dcab48d
@ -37,7 +37,6 @@
|
|||||||
|
|
||||||
function error($parms)
|
function error($parms)
|
||||||
{
|
{
|
||||||
global $phpgw;
|
|
||||||
if ($parms == '')
|
if ($parms == '')
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@ -61,17 +60,17 @@
|
|||||||
$this->ismsg = $parms['ismsg'];
|
$this->ismsg = $parms['ismsg'];
|
||||||
$this->fname = $fname;
|
$this->fname = $fname;
|
||||||
$this->line = $line;
|
$this->line = $line;
|
||||||
$this->app = $phpgw_info['flags']['currentapp'];
|
$this->app = $GLOBALS['phpgw_info']['flags']['currentapp'];
|
||||||
|
|
||||||
if (!$this->fname or !$this->line)
|
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',
|
'text'=>'W-PGMERR, Programmer failed to pass __FILE__ and/or __LINE__ in next log message',
|
||||||
'file'=>__FILE__,'line'=>__LINE__
|
'file'=>__FILE__,'line'=>__LINE__
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
$phpgw->log->errorstack[] = $this;
|
$GLOBALS['phpgw']->log->errorstack[] = $this;
|
||||||
if ($this->severity == 'F')
|
if ($this->severity == 'F')
|
||||||
{
|
{
|
||||||
// This is it... Don't return
|
// This is it... Don't return
|
||||||
@ -81,11 +80,11 @@
|
|||||||
echo "<Center>";
|
echo "<Center>";
|
||||||
echo "<h1>Fatal Error</h1>";
|
echo "<h1>Fatal Error</h1>";
|
||||||
echo "<h2>Error Stack</h2>";
|
echo "<h2>Error Stack</h2>";
|
||||||
echo $phpgw->log->astable();
|
echo $GLOBALS['phpgw']->log->astable();
|
||||||
echo "</center>";
|
echo "</center>";
|
||||||
// Commit stack to log
|
// Commit stack to log
|
||||||
$phpgw->log->commit();
|
$GLOBALS['phpgw']->log->commit();
|
||||||
$phpgw->common->phpgw_exit(True);
|
$GLOBALS['phpgw']->common->phpgw_exit(True);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -104,14 +104,13 @@
|
|||||||
|
|
||||||
function commit()
|
function commit()
|
||||||
{
|
{
|
||||||
global $phpgw, $phpgw_info;
|
$db = $GLOBALS['phpgw']->db;
|
||||||
$db = $phpgw->db;
|
|
||||||
// $db->lock('phpgw_log');
|
// $db->lock('phpgw_log');
|
||||||
$db->query ("insert into phpgw_log (log_date, log_user, log_app, log_severity) values "
|
$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
|
."','".$GLOBALS['phpgw']->session->account_id
|
||||||
."','".$phpgw_info['flags']['currentapp']."'"
|
."','".$GLOBALS['phpgw_info']['flags']['currentapp']."'"
|
||||||
.",'".$this->severity()."'"
|
.",'".$this->severity()."'"
|
||||||
.")"
|
.")"
|
||||||
,__LINE__,__FILE__);
|
,__LINE__,__FILE__);
|
||||||
@ -131,7 +130,7 @@
|
|||||||
."log_msg_code, log_msg_msg, log_msg_parms, log_msg_file, log_msg_line) values "
|
."log_msg_code, log_msg_msg, log_msg_parms, log_msg_file, log_msg_line) values "
|
||||||
."(" . $log_id
|
."(" . $log_id
|
||||||
."," . $i
|
."," . $i
|
||||||
.", '" . $phpgw->db->to_timestamp($err->timestamp
|
.", '" . $GLOBALS['phpgw']->db->to_timestamp($err->timestamp
|
||||||
)
|
)
|
||||||
."', '". $err->severity . "'"
|
."', '". $err->severity . "'"
|
||||||
.", '". $err->code . "'"
|
.", '". $err->code . "'"
|
||||||
@ -167,8 +166,6 @@
|
|||||||
|
|
||||||
function astable()
|
function astable()
|
||||||
{
|
{
|
||||||
global $phpgw;
|
|
||||||
|
|
||||||
$html = "<center>\n";
|
$html = "<center>\n";
|
||||||
$html .= "<table width=\"98%\">\n";
|
$html .= "<table width=\"98%\">\n";
|
||||||
$html .= "\t<tr bgcolor=\"D3DCFF\">\n";
|
$html .= "\t<tr bgcolor=\"D3DCFF\">\n";
|
||||||
@ -197,7 +194,7 @@
|
|||||||
|
|
||||||
$html .= "\t<tr bgcolor=".'"'.$color.'"'.">\n";
|
$html .= "\t<tr bgcolor=".'"'.$color.'"'.">\n";
|
||||||
$html .= "\t\t<td align=center>".$i."</td>\n";
|
$html .= "\t\t<td align=center>".$i."</td>\n";
|
||||||
$html .= "\t\t<td>".$phpgw->common->show_date($err->timestamp)."</td>\n";
|
$html .= "\t\t<td>".$GLOBALS['phpgw']->common->show_date($err->timestamp)."</td>\n";
|
||||||
$html .= "\t\t<td>".$err->app."  </td>\n";
|
$html .= "\t\t<td>".$err->app."  </td>\n";
|
||||||
$html .= "\t\t<td align=center>".$err->severity."</td>\n";
|
$html .= "\t\t<td align=center>".$err->severity."</td>\n";
|
||||||
$html .= "\t\t<td>".$err->code."</td>\n";
|
$html .= "\t\t<td>".$err->code."</td>\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user