"have_style" detection code cleanup
[www.energie.vellum.cz.git] / common.php
index f0fd2c9..aae2fe0 100644 (file)
@@ -25,7 +25,7 @@
        else if (ereg("[[:<:]]Mozilla/([0-9]+)\\.",$user_agent,$mozilla_major_a))
                $mozilla_major=$mozilla_major_a[1];
 
-       $have_style=!ereg("Mozilla/4\\.[5-7]",$user_agent);
+       $have_style=!isset($mozilla_major) || $mozilla_major!=4;
        $have_css=true; // doesn't hurt anybody AFAIK
 
 function addpercents($url)