From e3d161cb8ff2459746555bb546b7733ab25d8479 Mon Sep 17 00:00:00 2001 From: short <> Date: Sat, 8 Sep 2001 19:36:50 +0000 Subject: [PATCH] "Mozilla/4.[5-7]" finally compatible: CSS is OK but "style=" was hurting! - "style=..." at least replaced by "border=0" --- common.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/common.php b/common.php index 89ead4d..f0fd2c9 100644 --- a/common.php +++ b/common.php @@ -25,7 +25,8 @@ else if (ereg("[[:<:]]Mozilla/([0-9]+)\\.",$user_agent,$mozilla_major_a)) $mozilla_major=$mozilla_major_a[1]; - $have_css=!ereg("Mozilla/4\\.[5-7]",$user_agent); + $have_style=!ereg("Mozilla/4\\.[5-7]",$user_agent); + $have_css=true; // doesn't hurt anybody AFAIK function addpercents($url) { @@ -149,7 +150,10 @@ function month_a($year,$month,$month_last=0,$sequential=0) function img_size($width,$height) { - return("style=\"border:0;width:${width}px;height:${height}px\" width=\"$width\" height=\"$height\""); + global $have_style; + + return(($have_style ? "style=\"border:0;width:${width}px;height:${height}px\"" : "border=\"0\"") + ." width=\"$width\" height=\"$height\""); } function img($file,$alt,$attrs="") -- 1.8.3.1