Project

General

Profile

Bug #22533 ยป 14230.diff

Administrator Admin, 2010-04-27 23:38

View differences:

t3lib/matchcondition/class.t3lib_matchcondition_abstract.php (working copy)
switch ($key) {
case 'browser':
$values = t3lib_div::trimExplode(',', $value, true);
// take all founded browsers into account, eg chrome deliver
// webkit=>532.5, chrome=>4.1, safari=>532.5
// so comparing string will be
// "webkit532.5 chrome4.1 safari532.5"
$all = '';
foreach($browserInfo as $key => $value) {
$all .= $key . $value . ' ';
}
foreach ($values as $test) {
if (strpos($browserInfo['browser'] . $browserInfo['version'], $test) !== false) {
if (strpos($all, $test) !== false) {
return true;
}
}
......
}
}
/**
* Evaluates a TypoScript condition given as input, eg. "[browser=net][...(other conditions)...]"
*
    (1-1/1)