diff options
| author | Igor Wiedler <igor@wiedler.ch> | 2011-07-13 19:20:16 +0200 |
|---|---|---|
| committer | Igor Wiedler <igor@wiedler.ch> | 2011-07-15 22:34:24 +0200 |
| commit | 0bf6966c5228d446c4f0d3862619db0f619c7369 (patch) | |
| tree | 3f8adfb570262a9296e7a4fdb191804bfde7a4c0 /phpBB/style.php | |
| parent | 09e0460e5b53f83f4c06703c8bd8f1cb0f22eb48 (diff) | |
| download | forums-0bf6966c5228d446c4f0d3862619db0f619c7369.tar forums-0bf6966c5228d446c4f0d3862619db0f619c7369.tar.gz forums-0bf6966c5228d446c4f0d3862619db0f619c7369.tar.bz2 forums-0bf6966c5228d446c4f0d3862619db0f619c7369.tar.xz forums-0bf6966c5228d446c4f0d3862619db0f619c7369.zip | |
[feature/request-class] Add server(), header() and is_ajax() to request
Extend the request class with helpers for reading server vars (server())
and HTTP request headers (header()). Refactor the existing code base
to make use of these helpers, make $_SERVER a deactivated super global.
Also introduce an is_ajax() method, which checks the X-Requested-With
header for the value 'XMLHttpRequest', which is sent by JavaScript
libraries, such as jQuery.
PHPBB3-9716
Diffstat (limited to 'phpBB/style.php')
| -rw-r--r-- | phpBB/style.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/phpBB/style.php b/phpBB/style.php index 62be0dde2b..caa45784de 100644 --- a/phpBB/style.php +++ b/phpBB/style.php @@ -152,7 +152,7 @@ if ($id) if ($config['gzip_compress']) { // IE6 is not able to compress the style (do not ask us why!) - $browser = (!empty($_SERVER['HTTP_USER_AGENT'])) ? strtolower(htmlspecialchars((string) $_SERVER['HTTP_USER_AGENT'])) : ''; + $browser = strtolower($request->header('User-Agent', '', true)); if ($browser && strpos($browser, 'msie 6.0') === false && @extension_loaded('zlib') && !headers_sent()) { |
