"fix for boolean options"

This commit is contained in:
Ralf Becker 2008-11-12 18:40:10 +00:00
parent bf3c88731d
commit f0a4de499b

View File

@ -126,8 +126,8 @@ class html
{
foreach($options as $option => $value)
{
$opt_out .= 'this.T_'.strtoupper($option).'='.(is_numeric($value)?$value:"'".str_replace(array("'",'"'),array("\\'",'"'),$value)."'").'; ';
$opt_out .= 'this.T_'.strtoupper($option).'='.(is_bool($value)?($value?'true':'false'):
(is_numeric($value)?$value:"'".str_replace(array("'",'"'),array("\\'",'"'),$value)."'")).'; ';
}
}
if ($text === False) return ' onmouseover="'.$opt_out.'return escape(this.innerHTML);"';