diff options
author | Arthur <arthur@hoa.ro> | 2016-03-01 12:15:41 +0100 |
---|---|---|
committer | Arthur <arthur@hoa.ro> | 2016-03-01 12:15:41 +0100 |
commit | 9f277ad878377768d6369a148788353d2545dbb8 (patch) | |
tree | c3bb1c194ff595fce041db58f2b6b4a2dc8e7d2b /index.php | |
parent | 40b25bef6a027b8e39975a84e8843a921ac1f607 (diff) | |
parent | 408def1a07acc3d07ffaa3e19e48b4d0929a7172 (diff) | |
download | Shaarli-9f277ad878377768d6369a148788353d2545dbb8.tar.gz Shaarli-9f277ad878377768d6369a148788353d2545dbb8.tar.zst Shaarli-9f277ad878377768d6369a148788353d2545dbb8.zip |
Merge pull request #504 from ArthurHoaro/hotfix/http_language
Fixes #503: check that HTTP_ACCEPT_LANGUAGE is set before calling autolocale
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -268,7 +268,10 @@ $GLOBALS['redirector'] = !empty($GLOBALS['redirector']) ? escape($GLOBALS['redir | |||
268 | // a token depending of deployment salt, user password, and the current ip | 268 | // a token depending of deployment salt, user password, and the current ip |
269 | define('STAY_SIGNED_IN_TOKEN', sha1($GLOBALS['hash'].$_SERVER["REMOTE_ADDR"].$GLOBALS['salt'])); | 269 | define('STAY_SIGNED_IN_TOKEN', sha1($GLOBALS['hash'].$_SERVER["REMOTE_ADDR"].$GLOBALS['salt'])); |
270 | 270 | ||
271 | autoLocale($_SERVER['HTTP_ACCEPT_LANGUAGE']); // Sniff browser language and set date format accordingly. | 271 | // Sniff browser language and set date format accordingly. |
272 | if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { | ||
273 | autoLocale($_SERVER['HTTP_ACCEPT_LANGUAGE']); | ||
274 | } | ||
272 | header('Content-Type: text/html; charset=utf-8'); // We use UTF-8 for proper international characters handling. | 275 | header('Content-Type: text/html; charset=utf-8'); // We use UTF-8 for proper international characters handling. |
273 | 276 | ||
274 | //================================================================================================== | 277 | //================================================================================================== |