Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.5.2

Request #14288 [Patch] Add Firefox 3 support
Submitted: 2008-07-03 18:02 UTC
From: davey Assigned: jrust
Status: Closed Package: Net_UserAgent_Detect (version 2.4.0)
PHP Version: Irrelevant OS: Irrelevant
Roadmaps: (Not assigned)    
Subscription  


 [2008-07-03 18:02 UTC] davey (Davey Shafik)
Description: ------------ Currently does not support Firefox 3, attached is a patch that adds this.

Comments

 [2008-07-03 18:04 UTC] davey (Davey Shafik)
Index: Detect.php =================================================================== --- Detect.php (revision 12940) +++ Detect.php (working copy) @@ -122,7 +122,7 @@ // Array that stores all of the flags for the vendor and version // of the different browsers $browser = &Net_UserAgent_Detect::_getStaticProperty('browser'); - $browser = array_flip(array('ns', 'ns2', 'ns3', 'ns4', 'ns4up', 'nav', 'ns6', 'belowns6', 'ns6up', 'firefox', 'firefox0.x', 'firefox1.x', 'firefox1.5', 'firefox2.x', 'gecko', 'ie', 'ie3', 'ie4', 'ie4up', 'ie5', 'ie5_5', 'ie5up', 'ie6', 'belowie6', 'ie6up', 'ie7', 'ie7up', 'opera', 'opera2', 'opera3', 'opera4', 'opera5', 'opera6', 'opera7', 'opera8', 'opera9', 'opera5up', 'opera6up', 'opera7up', 'belowopera8', 'opera8up', 'opera9up', 'aol', 'aol3', 'aol4', 'aol5', 'aol6', 'aol7', 'aol8', 'webtv', 'aoltv', 'tvnavigator', 'hotjava', 'hotjava3', 'hotjava3up', 'konq', 'safari', 'netgem', 'webdav', 'icab')); + $browser = array_flip(array('ns', 'ns2', 'ns3', 'ns4', 'ns4up', 'nav', 'ns6', 'belowns6', 'ns6up', 'firefox', 'firefox0.x', 'firefox1.x', 'firefox1.5', 'firefox2.x', 'firefox3.x', 'gecko', 'ie', 'ie3', 'ie4', 'ie4up', 'ie5', 'ie5_5', 'ie5up', 'ie6', 'belowie6', 'ie6up', 'ie7', 'ie7up', 'opera', 'opera2', 'opera3', 'opera4', 'opera5', 'opera6', 'opera7', 'opera8', 'opera9', 'opera5up', 'opera6up', 'opera7up', 'belowopera8', 'opera8up', 'opera9up', 'aol', 'aol3', 'aol4', 'aol5', 'aol6', 'aol7', 'aol8', 'webtv', 'aoltv', 'tvnavigator', 'hotjava', 'hotjava3', 'hotjava3up', 'konq', 'safari', 'netgem', 'webdav', 'icab')); // Array that stores all of the flags for the operating systems, // and in some cases the versions of those operating systems (windows) @@ -248,6 +248,7 @@ $browser['firefox1.x'] = $browser['firefox'] && strpos($agt, 'firefox/1.') !== false; $browser['firefox1.5'] = $browser['firefox'] && strpos($agt, 'firefox/1.5') !== false; $browser['firefox2.x'] = $browser['firefox'] && strpos($agt, 'firefox/2.') !== false; + $browser['firefox3.x'] = $browser['firefox'] && strpos($agt, 'firefox/3.') !== false; $browser['ie'] = strpos($agt, 'msie') !== false && !(strpos($agt, 'opera') !== false); $browser['ie3'] = $browser['ie'] && $majorVersion < 4; $browser['ie4'] = $browser['ie'] && $majorVersion == 4 && (strpos($agt, 'msie 4') !== false); @@ -421,7 +422,7 @@ Net_UserAgent_Detect::setFeature('dhtml'); } - if ($browser['firefox1.5'] || $browser['firefox2.x'] || $browser['opera9up']) { + if ($browser['firefox1.5'] || $browser['firefox2.x'] || $browser['firefox3.x'] || $browser['opera9up']) { Net_UserAgent_Detect::setFeature('svg'); } @@ -549,6 +550,7 @@ 'firefox1.x' => 'Firefox 1.x', 'firefox1.5' => 'Firefox 1.5', 'firefox2.x' => 'Firefox 2.x', + 'firefox3.x' => 'Firefox 3.x', 'konq' => 'Konqueror/Safari', 'netgem' => 'Netgem/iPlayer'); }
 [2008-09-03 15:08 UTC] jladicos (Jason Ladicos)
I can confirm that this patch works.
 [2008-10-12 00:28 UTC] jrust (Jason Rust)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.