Commit de8b1653 authored by Kasper Skårhøj's avatar Kasper Skårhøj
Browse files

* Added a wildcard like option for values in the "language" condition in frontend (matchcondition class). Can now match any language found in the HTTP_ACCEPT_LANGUAGE value.


git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@447 709f56b5-9817-0410-a4d7-c38de5d9e867
parent 7169c1e8
2004-08-29 Kasper Skårhøj,,, <kasper@typo3.com>
* Added a wildcard like option for values in the "language" condition in frontend (matchcondition class). Can now match any language found in the HTTP_ACCEPT_LANGUAGE value.
2004-08-29 Kasper Skårhøj,,, <kasper@typo3.com>
* Added "lockIP" setting for backend users - this will solve the problem that some has reported about backend users not being able to login with 3.7.0...
......
......@@ -170,7 +170,12 @@ class t3lib_matchCondition {
while(list(,$test)=each($values)) {
$test = trim($test);
if ($test) {
if (t3lib_div::getIndpEnv('HTTP_ACCEPT_LANGUAGE') == $test) {return true;}
if (ereg('^\*.+\*$',$test)) {
$allLanguages = split('[,;]',t3lib_div::getIndpEnv('HTTP_ACCEPT_LANGUAGE'));
if (in_array(substr($test,1,-1), $allLanguages)) {return true;}
} else {
if (t3lib_div::getIndpEnv('HTTP_ACCEPT_LANGUAGE') == $test) {return true;}
}
}
}
break;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment