-
Improvement
-
Resolution: Won't Fix
-
Minor
-
3.0.11
-
None
-
PHP 5.3.8
In /includes/questionnaire/questionnaire.php the user agent is recognized as:
if (preg_match('#(' . $agent . ')[/ ]?([0-9.]*)#i', $user_agent, $match))
|
{
|
$aMatchOpera ) ) $match[2]= $aMatchOpera[1];
|
$result['user_agent'] = $match[1] . ' ' . $match[2];
|
break;
|
}
|
However, this will always bring up Opera/9.80 for Opera browsers although the version is higher for many years already. A typical user agent for Opera is:
Opera/9.80 (Windows NT 5.1; U; en) Presto/2.10.289 Version/12.01
|
So a more accurate code would be to pull the version component for the statistics:
if (preg_match('#(' . $agent . ')[/ ]?([0-9.]*)#i', $user_agent, $match))
|
{
|
if( preg_match( '#opera/[0-9].+version/([0-9.]*)#i', $user_agent, $aMatchOpera ) ) $match[2]= $aMatchOpera[1];
|
$result['user_agent'] = $match[1] . ' ' . $match[2];
|
break;
|
}
|