forked from extern/egroupware
Fixed the parameter substitution. Will now take parameters named either 'p1' or 'p_1'.
This commit is contained in:
parent
8bc7d387ce
commit
27e9b9af70
@ -48,7 +48,15 @@
|
||||
$str = 'p_'.$counter;
|
||||
if(isset($parms[$str]) && !empty($parms[$str]))
|
||||
{
|
||||
$parray[] = $parms[$str];
|
||||
$parray[$counter] = $parms[$str];
|
||||
}
|
||||
else
|
||||
{
|
||||
$str = 'p'.$counter;
|
||||
if(isset($parms[$str]) && !empty($parms[$str]))
|
||||
{
|
||||
$parray[$counter] = $parms[$str];
|
||||
}
|
||||
}
|
||||
}
|
||||
$fname = $parms['file'];
|
||||
@ -63,6 +71,14 @@
|
||||
{
|
||||
$this->msg = trim($etext);
|
||||
}
|
||||
|
||||
@reset($parray);
|
||||
while( list($key,$val) = each( $parray ) )
|
||||
{
|
||||
$this->msg = preg_replace( "/%$key/", "'".$val."'", $this->msg );
|
||||
}
|
||||
@reset($parray);
|
||||
|
||||
$this->timestamp = time();
|
||||
$this->parms = $parray;
|
||||
$this->ismsg = $parms['ismsg'];
|
||||
|
@ -134,7 +134,7 @@
|
||||
."', '". $err->severity . "'"
|
||||
.", '". $err->code . "'"
|
||||
.", '". $db->db_addslashes($err->msg) . "'"
|
||||
.", '". $db->db_addslashes(implode('|',$err->parms)). "'"
|
||||
.", '". $db->db_addslashes((count($err->parms) > 1?implode('|',$err->parms):$err->parms[1])). "'"
|
||||
.", '". $err->fname . "'"
|
||||
.", " . intval($err->line)
|
||||
.")"
|
||||
|
Loading…
Reference in New Issue
Block a user