From 053999cff3b0642b54bbc3610f992700b430074e Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Mon, 9 Jul 2012 18:20:46 +0200 Subject: Fixed language loading bugs and removed debug code. * User language was not loaded directly after logging in. * Default language was not loaded directly after logging out. * Removed stupid debug code. Was there since 2011-Oct-5. Unnoticed. *sigh* --- ratatoeskr/backend.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ratatoeskr/backend.php b/ratatoeskr/backend.php index 19d3891..ae72195 100644 --- a/ratatoeskr/backend.php +++ b/ratatoeskr/backend.php @@ -135,6 +135,7 @@ $backend_subactions = url_action_subactions(array( /* Login successful. */ $_SESSION["ratatoeskr_uid"] = $user->get_id(); $_SESSION["ratatoeskr_pwhash"] = $user->pwhash; + load_language($user->language); $data["user"] = $user; $ste->vars["user"] = array("id" => $user->get_id(), "name" => $user->username, "lang" => $user->language); } @@ -151,9 +152,9 @@ $backend_subactions = url_action_subactions(array( }), "logout" => url_action_simple(function($data) { - echo "foo"; unset($_SESSION["ratatoeskr_uid"]); unset($_SESSION["ratatoeskr_pwhash"]); + load_language(); throw new Redirect(array("login")); }), "content" => url_action_subactions(array( -- cgit v1.2.3-54-g00ecf