]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Merge pull request #783 from wallabag/message-after-login
authorNicolas Lœuillet <nicolas@loeuillet.org>
Mon, 18 Aug 2014 12:41:09 +0000 (14:41 +0200)
committerNicolas Lœuillet <nicolas@loeuillet.org>
Mon, 18 Aug 2014 12:41:09 +0000 (14:41 +0200)
#763 fix to display the login successful message with the translation

inc/poche/Poche.class.php

index 098dd7c19c16b6f1891157c32a7639ac0b10e1f1..3e9c2991f600772f523197c08300eca0b768ca73 100755 (executable)
@@ -524,6 +524,14 @@ class Poche
                 $longlastingsession = isset($_POST['longlastingsession']);
                 $passwordTest = ($isauthenticated) ? $user['password'] : Tools::encodeString($password . $login);
                 Session::login($user['username'], $user['password'], $login, $passwordTest, $longlastingsession, array('poche_user' => new User($user)));
+
+                # reload l10n
+                $language = $user['config']['language'];
+                @putenv('LC_ALL=' . $language);
+                setlocale(LC_ALL, $language);
+                bindtextdomain($language, LOCALE);
+                textdomain($language);
+
                 $this->messages->add('s', _('welcome to your wallabag'));
                 Tools::logm('login successful');
                 Tools::redirect($referer);