From 10ab20d8e21b2fa3f4d8e86909a7cb4d0d9a84d2 Mon Sep 17 00:00:00 2001 From: NumEricR Date: Mon, 26 Aug 2013 22:21:22 +0200 Subject: Fix missing lang in html tag of update pages --- install/update.php | 2 +- install/update_to_1beta3.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/install/update.php b/install/update.php index 1deaf7f3..9548d334 100644 --- a/install/update.php +++ b/install/update.php @@ -10,7 +10,7 @@ $store = new Database(); - + updating poche diff --git a/install/update_to_1beta3.php b/install/update_to_1beta3.php index 8c93af6d..e0da1590 100644 --- a/install/update_to_1beta3.php +++ b/install/update_to_1beta3.php @@ -10,7 +10,7 @@ $old_salt = '464v54gLLw928uz4zUBqkRJeiPY68zCX'; - + updating poche -- cgit v1.2.3 From 1b2abab6ddbb3460b8981a296fe04477a42801b3 Mon Sep 17 00:00:00 2001 From: NumEricR Date: Mon, 26 Aug 2013 22:25:03 +0200 Subject: Add lang attribute in html tag --- inc/poche/Tools.class.php | 5 +++++ index.php | 1 + tpl/layout.twig | 1 + 3 files changed, 7 insertions(+) diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php index 3a792d43..1ab90be1 100644 --- a/inc/poche/Tools.class.php +++ b/inc/poche/Tools.class.php @@ -248,4 +248,9 @@ class Tools fclose($fp); } } + + public static function getDocLanguage($userlanguage) { + $lang = explode('.', $userlanguage); + return str_replace('_', '-', $lang[0]); + } } \ No newline at end of file diff --git a/index.php b/index.php index 7b775c41..52a400a8 100644 --- a/index.php +++ b/index.php @@ -50,6 +50,7 @@ elseif (isset($_GET['plainurl']) && !empty($_GET['plainurl'])) { # vars to send to templates $tpl_vars = array( + 'lang' => Tools::getDocLanguage($poche->user->getConfigValue('language')), 'referer' => $referer, 'view' => $view, 'poche_url' => Tools::getPocheUrl(), diff --git a/tpl/layout.twig b/tpl/layout.twig index 07ca231c..bb20075a 100644 --- a/tpl/layout.twig +++ b/tpl/layout.twig @@ -4,6 +4,7 @@ + -- cgit v1.2.3 From d081f272b0b63cdf86ab7666747b63dbff7f068e Mon Sep 17 00:00:00 2001 From: NumEricR Date: Mon, 26 Aug 2013 22:27:51 +0200 Subject: Use dynamic lang value in IE conditional comments --- tpl/layout.twig | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tpl/layout.twig b/tpl/layout.twig index bb20075a..fec7054a 100644 --- a/tpl/layout.twig +++ b/tpl/layout.twig @@ -1,9 +1,8 @@ - - - - - + + + + -- cgit v1.2.3