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;
|
$str = 'p_'.$counter;
|
||||||
if(isset($parms[$str]) && !empty($parms[$str]))
|
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'];
|
$fname = $parms['file'];
|
||||||
@ -63,6 +71,14 @@
|
|||||||
{
|
{
|
||||||
$this->msg = trim($etext);
|
$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->timestamp = time();
|
||||||
$this->parms = $parray;
|
$this->parms = $parray;
|
||||||
$this->ismsg = $parms['ismsg'];
|
$this->ismsg = $parms['ismsg'];
|
||||||
|
@ -134,7 +134,7 @@
|
|||||||
."', '". $err->severity . "'"
|
."', '". $err->severity . "'"
|
||||||
.", '". $err->code . "'"
|
.", '". $err->code . "'"
|
||||||
.", '". $db->db_addslashes($err->msg) . "'"
|
.", '". $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 . "'"
|
.", '". $err->fname . "'"
|
||||||
.", " . intval($err->line)
|
.", " . intval($err->line)
|
||||||
.")"
|
.")"
|
||||||
|
Loading…
Reference in New Issue
Block a user