Formatting and php3 fixes

This commit is contained in:
Miles Lott 2001-08-15 16:30:16 +00:00
parent 6a7f952b42
commit 4fd65d883a
2 changed files with 26 additions and 35 deletions

View File

@ -26,7 +26,7 @@
var $fname;
var $line;
var $app;
var $public_functions = array();
// Translate Message into Language
@ -41,7 +41,7 @@
if ($parms == '')
{
return;
};
}
$etext =$parms['text'];
$parray = array($parms['p1'],$parms['p2'],$parms['p3'],$parms['p4'],$parms['p5'],$parms['p6'],$parms['p7'],$parms['p8'],$parms['p9'],$parms['p10']);
$fname = $parms['file'];
@ -62,15 +62,15 @@
$this->fname = $fname;
$this->line = $line;
$this->app = $phpgw_info['flags']['currentapp'];
if (!$this->fname or !$this->line)
{
$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->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;
if ($this->severity == 'F')
{

View File

@ -1,6 +1,6 @@
<?php
/**************************************************************************\
* phpGroupWare - errorlog *
* phpGroupWare - errorlog *
* http://www.phpgroupware.org *
* This application written by jerry westrick <jerry@westrick.com> *
* -------------------------------------------- *
@ -18,23 +18,23 @@
* Instance Variables... *
\***************************/
var $errorstack = array();
var $public_functions = array('message',
'error',
'iserror',
'severity',
'commit',
'clearstack',
'astable',
);
var $public_functions = array(
'message',
'error',
'iserror',
'severity',
'commit',
'clearstack',
'astable'
);
function message($parms)
{
$parms['ismsg']=1;
CreateObject('phpgwapi.error',$parms);
return true;
}
function error($parms)
{
$parms['ismsg']=0;
@ -42,7 +42,6 @@
return true;
}
function write($parms)
{
$parms['ismsg']=0;
@ -53,12 +52,7 @@
$this->errorstack = $save;
return true;
}
function iserror($parms)
{
$ecode = $parms['code'];
@ -73,8 +67,7 @@
}
return false;
}
function severity()
{
$max = 'D';
@ -99,10 +92,9 @@
}
return $max;
}
function commit()
{
global $phpgw, $phpgw_info;
$db = $phpgw->db;
// $db->lock('phpgw_log');
@ -147,7 +139,6 @@
return true;
}
function clearstack()
{
$new = array();
@ -181,7 +172,7 @@
$html .= "\t\t<td >File</td>\n";
$html .= "\t\t<td >Line</td>\n";
$html .= "\t</tr>\n";
$errorstack = $this->errorstack;
for ($i = 0; $i < count($errorstack); $i++)
{
@ -194,7 +185,7 @@
case 'E': $color = 'FFC0C0'; break;
case 'F': $color = 'FF0909'; break;
}
$html .= "\t<tr bgcolor=".'"'.$color.'"'.">\n";
$html .= "\t\t<td align=center>".$i."</td>\n";
$html .= "\t\t<td>".$phpgw->common->show_date($err->timestamp)."</td>\n";
@ -208,7 +199,7 @@
};
$html .= "</table>\n";
$html .= "</center>\n";
return $html;
}
}