@@ 1310-1318 (lines=9) @@ | ||
1307 | // A boolean result |
|
1308 | $return = ! empty($info[substr($key, 3)]); |
|
1309 | break; |
|
1310 | case 'languages': |
|
1311 | $return = array(); |
|
1312 | if (! empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { |
|
1313 | if (preg_match_all('/[-a-z]{2,}/', strtolower(trim($_SERVER['HTTP_ACCEPT_LANGUAGE'])), $matches)) { |
|
1314 | // Found a result |
|
1315 | $return = $matches[0]; |
|
1316 | } |
|
1317 | } |
|
1318 | break; |
|
1319 | case 'charsets': |
|
1320 | $return = array(); |
|
1321 | if (! empty($_SERVER['HTTP_ACCEPT_CHARSET'])) { |
|
@@ 1319-1327 (lines=9) @@ | ||
1316 | } |
|
1317 | } |
|
1318 | break; |
|
1319 | case 'charsets': |
|
1320 | $return = array(); |
|
1321 | if (! empty($_SERVER['HTTP_ACCEPT_CHARSET'])) { |
|
1322 | if (preg_match_all('/[-a-z0-9]{2,}/', strtolower(trim($_SERVER['HTTP_ACCEPT_CHARSET'])), $matches)) { |
|
1323 | // Found a result |
|
1324 | $return = $matches[0]; |
|
1325 | } |
|
1326 | } |
|
1327 | break; |
|
1328 | case 'referrer': |
|
1329 | if (! empty($_SERVER['HTTP_REFERER'])) { |
|
1330 | // Found a result |