aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Hiebel <leuhmanu@mageia.org>2014-04-09 15:20:32 +0000
committerManuel Hiebel <leuhmanu@mageia.org>2014-04-09 15:20:32 +0000
commit3a602c026bc93f46c3b58e50cc5900c431400415 (patch)
treed8ab04386935003f0badcc1db35cc7cfc453882d
parente0a8509c492ac97e76b7092632c4b7f9c293c2e1 (diff)
downloadnav-3a602c026bc93f46c3b58e50cc5900c431400415.tar
nav-3a602c026bc93f46c3b58e50cc5900c431400415.tar.gz
nav-3a602c026bc93f46c3b58e50cc5900c431400415.tar.bz2
nav-3a602c026bc93f46c3b58e50cc5900c431400415.tar.xz
nav-3a602c026bc93f46c3b58e50cc5900c431400415.zip
workaround nav bar lang
-rw-r--r--html/index.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/html/index.php b/html/index.php
index 0450a94..89125a1 100644
--- a/html/index.php
+++ b/html/index.php
@@ -27,9 +27,10 @@ $url = isset($_GET['u']) ? trim($_GET['u']) : null;
/** html[lang] of the doc. */
$lang = isset($_GET['l']) ? trim($_GET['l']) : null;
if ($lang == 'undefined' ||
- $lang == '') {
-
- $lang = 'en';
+ $lang == '' ||
+ $lang == 'en') {
+$lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
+// $lang = 'en';
}
/** body[class] of the doc. */
@@ -49,6 +50,6 @@ header('Access-Control-Allow-Methods: GET');
header('Content-Type: text/html;charset=utf-8');
header(sprintf('Expires: %s', gmdate('r', strtotime('+1 day'))));
-echo _mgnav_html($wrap, $lang, null, $www_host, NCache::build($cache_path));
+echo _mgnav_html($wrap, $lang, null, '//1-mageia.rhcloud.com/', NCache::build($cache_path));
-apache_note('navMakeTime', number_format(microtime() - $t0, 6)); \ No newline at end of file
+apache_note('navMakeTime', number_format(microtime() - $t0, 6));