aboutsummaryrefslogtreecommitdiffstats
path: root/html
diff options
context:
space:
mode:
authorRomain d'Alverny <rda@mageia.org>2012-05-25 13:38:44 +0000
committerRomain d'Alverny <rda@mageia.org>2012-05-25 13:38:44 +0000
commit80ff1e7281f80fa6d5bed5aee23e50db47c2577a (patch)
tree017b9afc2e0a92a5938c2ab476ed42353b0d3fc7 /html
parent76a322d0d2248e450f36a82b3d3bb2f6bb4ecab4 (diff)
downloadnav-80ff1e7281f80fa6d5bed5aee23e50db47c2577a.tar
nav-80ff1e7281f80fa6d5bed5aee23e50db47c2577a.tar.gz
nav-80ff1e7281f80fa6d5bed5aee23e50db47c2577a.tar.bz2
nav-80ff1e7281f80fa6d5bed5aee23e50db47c2577a.tar.xz
nav-80ff1e7281f80fa6d5bed5aee23e50db47c2577a.zip
remote lang may be returned as undefined
Diffstat (limited to 'html')
-rw-r--r--html/index.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/html/index.php b/html/index.php
index 31ba1d5..7297f84 100644
--- a/html/index.php
+++ b/html/index.php
@@ -9,6 +9,11 @@ $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';
+}
/** body[class] of the doc. */
$body = isset($_GET['b']) ? trim($_GET['b']) : null;
@@ -25,4 +30,4 @@ header('Access-Control-Allow-Origin: *');
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); \ No newline at end of file
+echo _mgnav_html($wrap, $lang);