*
* The Initial Developer of the Original Code is
* KaiRo - Robert Kaiser.
- * Portions created by the Initial Developer are Copyright (C) 2003
+ * Portions created by the Initial Developer are Copyright (C) 2003-2007
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): Robert Kaiser <kairo@kairo.at>
if (!isset($this->uadata['engine'])) {
$this->uadata['engine'] = 'unknown';
$this->uadata['geckodate'] = null;
- if (preg_match('|Gecko/([0-9]+)|', $this->uastring, $regs)) {
+ if (preg_match('|Gecko/([0-9]+)|', $this->uastring, $regs) && (strpos($this->brand, 'Opera') === false)) {
$this->uadata['engine'] = 'gecko';
$this->uadata['geckodate'] = $regs[1];
}
$this->uadata['os'] = $regs[1];
$this->uadata['lang'] = $regs[2];
}
+ // Opera 9 Firefox-spoofing
+ elseif (preg_match('/Mozilla\/[^\(]+ \((?:X11; )?([^;]+);.+; ([a-z_-]+); rv:([^\);]+)\) Gecko\/\d+ Firefox\/[0-9a-zA-Z\.+]+ Opera [^ ]+/i', $this->uastring, $regs)) {
+ $this->uadata['eng_version'] = $this->getVersion();
+ $this->uadata['os'] = $regs[1];
+ $this->uadata['lang'] = $regs[2];
+ }
}
elseif ($this->hasEngine('nscp')) {
if (preg_match('/Mozilla\/([0-9a-zA-Z\.+]+) (?:\[([a-z_-]+)\][^\(]+)?\(X11; [^;]+; ([^\)]+)\)/i', $this->uastring, $regs)) {