X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=index.php;h=850b350e9c5ad1c2dbae08c5573b929aaf22749b;hb=797a6f308fadab9965165e88d56cb0759140e3cc;hp=6712f90ea7e4029d4cc949ac1b341a9d106d3a75;hpb=b0faecb959b1c4afc8b94ba43bdcc258976dbd1b;p=github%2Fshaarli%2FShaarli.git diff --git a/index.php b/index.php index 6712f90e..850b350e 100644 --- a/index.php +++ b/index.php @@ -1,6 +1,6 @@ /shaarli/ define('WEB_PATH', substr($_SERVER["REQUEST_URI"], 0, 1+strrpos($_SERVER["REQUEST_URI"], '/', 0))); @@ -268,7 +268,10 @@ $GLOBALS['redirector'] = !empty($GLOBALS['redirector']) ? escape($GLOBALS['redir // a token depending of deployment salt, user password, and the current ip define('STAY_SIGNED_IN_TOKEN', sha1($GLOBALS['hash'].$_SERVER["REMOTE_ADDR"].$GLOBALS['salt'])); -autoLocale($_SERVER['HTTP_ACCEPT_LANGUAGE']); // Sniff browser language and set date format accordingly. +// Sniff browser language and set date format accordingly. +if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { + autoLocale($_SERVER['HTTP_ACCEPT_LANGUAGE']); +} header('Content-Type: text/html; charset=utf-8'); // We use UTF-8 for proper international characters handling. //==================================================================================================