From 494d31e47a20a008c7de67c92f758fb9969df4a1 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 8 Mar 2010 06:44:27 +0000 Subject: [PATCH] missing part of the patch for 1.4 --- login.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/login.php b/login.php index 3b405771ba..59ff77db7d 100755 --- a/login.php +++ b/login.php @@ -237,7 +237,7 @@ $remember_time,'/'); // make the cookie valid for the whole site (incl. sitemgr) and not only the eGW install-dir } - if ($_POST['lang'] && preg_match('/^[a-z]{2}(-[a-z]{2}){0,1}$/',$_POST['lang']) && + if ($_POST['lang'] && preg_match('/^[a-z]{2}(-[a-z]{2})?$/',$_POST['lang']) && $_POST['lang'] != $GLOBALS['egw_info']['user']['preferences']['common']['lang']) { $GLOBALS['egw']->preferences->add('common','lang',$_POST['lang'],'session'); @@ -296,7 +296,7 @@ $GLOBALS['egw_info']['user']['preferences'] = $prefs->read_repository(); } } - if ($_GET['lang']) + if ($_GET['lang'] && preg_match('/^[a-z]{2}(-[a-z]{2})?$/',$_GET['lang'])) { $GLOBALS['egw_info']['user']['preferences']['common']['lang'] = $_GET['lang']; }