projects
/
php-utility-classes.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
31fe75c
)
actually use the Gecko/XX.X as engine version when not a date
author
Robert Kaiser
<kairo@kairo.at>
Tue, 27 Nov 2012 03:12:33 +0000
(
04:12
+0100)
committer
Robert Kaiser
<kairo@kairo.at>
Tue, 27 Nov 2012 03:12:33 +0000
(
04:12
+0100)
include/classes/useragent.php-class
patch
|
blob
|
blame
|
history
diff --git
a/include/classes/useragent.php-class
b/include/classes/useragent.php-class
index 108649fb81c4d0169dd07e51aedb332599907adc..4afd3e80b89520c1571a3dbee28c290705c575b6 100755
(executable)
--- a/
include/classes/useragent.php-class
+++ b/
include/classes/useragent.php-class
@@
-1037,7
+1037,13
@@
class userAgent {
if (preg_match('|Gecko/([0-9\.]+)|', $this->uastring, $regs) && (strpos($this->brand, 'Opera') === false)) {
$this->uadata['engine'] = 'gecko';
// If it looks like a version number, i.e. shorter than 4 chars or has a . in it, it's no date.
if (preg_match('|Gecko/([0-9\.]+)|', $this->uastring, $regs) && (strpos($this->brand, 'Opera') === false)) {
$this->uadata['engine'] = 'gecko';
// If it looks like a version number, i.e. shorter than 4 chars or has a . in it, it's no date.
- $this->uadata['geckodate'] = ((strlen($regs[1]) > 4) && (strpos($regs[1], '.') === false))?$regs[1]:null;
+ if ((strlen($regs[1]) > 4) && (strpos($regs[1], '.') === false)) {
+ $this->uadata['geckodate'] = $regs[1];
+ }
+ else {
+ $this->uadata['geckodate'] = null;
+ $this->uadata['eng_version'] = $regs[1];
+ }
}
elseif ((strpos($this->brand, 'Internet Explorer') !== false) || (strpos($this->brand, 'FrontPage') !== false)) {
if ((strpos(strtolower($this->uastring), 'mac') !== false) && (intval($this->getVersion()) >= 5)) {
}
elseif ((strpos($this->brand, 'Internet Explorer') !== false) || (strpos($this->brand, 'FrontPage') !== false)) {
if ((strpos(strtolower($this->uastring), 'mac') !== false) && (intval($this->getVersion()) >= 5)) {