[imp] older browsers and auto_expand...

liamr@umich.edu liamr@umich.edu
Thu, 15 Aug 2002 22:00:04 -0400


> It looks like the easiest thing in the UA string to check would either be
> the data on the gecko release (ie gecko/20020611 in mozilla 1.0 vs
> gecko/20020508) or the revision string (ie rv:1.0.0 in mozilla 1.0 vs 
> rv:0.9.4.1 in ns6.23)

So, I went with the latter.  I imagine this will only be an issue w/ NS6, as 
NS7 seems to be based on the Mozilla 1.x release:

Index: Browser.php
===================================================================
RCS file: /repository/horde/lib/Browser.php,v
retrieving revision 1.49
diff -U2 -r1.49 Browser.php
--- Browser.php 15 Aug 2002 17:57:55 -0000      1.49
+++ Browser.php 16 Aug 2002 01:52:47 -0000
@@ -211,5 +211,9 @@
                     $this->setFeature('javascript', 1.4);
                     $this->setFeature('dom');
-                    $this->setFeature('iframes');
+                    if (preg_match('|rv:(.*)\)|', $this->agent, $revision)) {
+                        if ( $revision[1] >= 1 ) {
+                            $this->setFeature('iframes');
+                            }
+                        }
                     break;