aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2018-01-31 12:39:17 +0100
committerArthurHoaro <arthur@hoa.ro>2018-01-31 12:39:17 +0100
commitb7c412d4d0fec7f3f54ecaa09178afa16c779d7e (patch)
treeb2b0dce6c36f4a7f9f4f7e0f5e6811791fb3bccf /index.php
parent2cbf4acddeeed9d6d775566b1dec560b1452d8eb (diff)
downloadShaarli-b7c412d4d0fec7f3f54ecaa09178afa16c779d7e.tar.gz
Shaarli-b7c412d4d0fec7f3f54ecaa09178afa16c779d7e.tar.zst
Shaarli-b7c412d4d0fec7f3f54ecaa09178afa16c779d7e.zip
Use LC_COLLATE instead of LC_MESSAGES if php-intl is not installed
As stated in the docs: > LC_MESSAGES for system responses (available if PHP was compiled with libintl) Fixes #1067
Diffstat (limited to 'index.php')
-rw-r--r--index.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/index.php b/index.php
index d57789e6..2de9be0a 100644
--- a/index.php
+++ b/index.php
@@ -124,6 +124,11 @@ if (isset($_COOKIE['shaarli']) && !SessionManager::checkId($_COOKIE['shaarli']))
124$conf = new ConfigManager(); 124$conf = new ConfigManager();
125$sessionManager = new SessionManager($_SESSION, $conf); 125$sessionManager = new SessionManager($_SESSION, $conf);
126 126
127// LC_MESSAGES isn't defined without php-intl, in this case use LC_COLLATE locale instead.
128if (! defined('LC_MESSAGES')) {
129 define('LC_MESSAGES', LC_COLLATE);
130}
131
127// Sniff browser language and set date format accordingly. 132// Sniff browser language and set date format accordingly.
128if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { 133if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
129 autoLocale($_SERVER['HTTP_ACCEPT_LANGUAGE']); 134 autoLocale($_SERVER['HTTP_ACCEPT_LANGUAGE']);