From 80ff1e7281f80fa6d5bed5aee23e50db47c2577a Mon Sep 17 00:00:00 2001 From: Romain d'Alverny Date: Fri, 25 May 2012 13:38:44 +0000 Subject: remote lang may be returned as undefined --- html/index.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'html') 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); -- cgit v1.2.1