aboutsummaryrefslogtreecommitdiffstats
path: root/html/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'html/index.php')
-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));