aboutsummaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-09-21 16:00:17 -0700
committerFriendika <info@friendika.com>2011-09-21 16:00:17 -0700
commit542aa22eb94e0f20806552b83cec2e46cf3b6f1b (patch)
tree1964dcac5bd41d9049dc0abbca67fa552da710a2 /index.php
parent030e1e82c32a3061abf71ffb90e65f2b9197d8a4 (diff)
downloadvolse-hubzilla-542aa22eb94e0f20806552b83cec2e46cf3b6f1b.tar.gz
volse-hubzilla-542aa22eb94e0f20806552b83cec2e46cf3b6f1b.tar.bz2
volse-hubzilla-542aa22eb94e0f20806552b83cec2e46cf3b6f1b.zip
provide ability to unset session language
Diffstat (limited to 'index.php')
-rw-r--r--index.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/index.php b/index.php
index 80e8ca3b0..17d250e5f 100644
--- a/index.php
+++ b/index.php
@@ -84,8 +84,12 @@ session_start();
* We have to do it here because the session was just now opened.
*/
-if(x($_POST,'system_language'))
- $_SESSION['language'] = $_POST['system_language'];
+if(array_key_exists('system_language',$_POST)) {
+ if(strlen($_POST['system_language']))
+ $_SESSION['language'] = $_POST['system_language'];
+ else
+ unset($_SESSION['language']);
+}
if((x($_SESSION,'language')) && ($_SESSION['language'] !== $lang)) {
$lang = $_SESSION['language'];
load_translation_table($lang);