lib/kolab_client_task.php

Aleksander Machniak machniak at kolabsys.com
Wed Jun 26 09:29:35 CEST 2013


 lib/kolab_client_task.php |    8 ++++++++
 1 file changed, 8 insertions(+)

New commits:
commit 9652212d7f584a4da1e15010c3cfdf639c17e89d
Author: Aleksander Machniak <alec at alec.pl>
Date:   Wed Jun 26 09:27:06 2013 +0200

    Fix uninitialized locale on login screen (in case when session exists but is invalid)

diff --git a/lib/kolab_client_task.php b/lib/kolab_client_task.php
index 4e937a5..c334fdb 100644
--- a/lib/kolab_client_task.php
+++ b/lib/kolab_client_task.php
@@ -76,6 +76,10 @@ class kolab_client_task
      */
     protected function locale_init()
     {
+        if (!empty(self::$translation)) {
+            return;
+        }
+
         $language = $this->get_language();
         $LANG     = array();
 
@@ -244,6 +248,7 @@ class kolab_client_task
                         $label = 'internalerror';
                         $this->raise_error(500, 'Login failed. ' . $str);
                     }
+
                     $this->output->command('display_message', $label, 'error');
                 }
             }
@@ -318,6 +323,9 @@ class kolab_client_task
      */
     private function action_logout($sess_expired = false, $stop_sess = true)
     {
+        // Initialize locales
+        $this->locale_init();
+
         if (!empty($_SESSION['user']) && !empty($_SESSION['user']['token']) && $stop_sess) {
             $this->api->logout();
         }





More information about the commits mailing list