]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - inc/poche/Poche.class.php
Merge branch 'dev' of https://github.com/wallabag/wallabag into dev
[github/wallabag/wallabag.git] / inc / poche / Poche.class.php
index 74827253fa33cf906ce32d971c93b475a9646cbf..9345d1c1cd9a73bbbf4e863a7ce445e0be24fe0f 100644 (file)
@@ -228,10 +228,6 @@ class Poche
         # filter for reading time
         $filter = new Twig_SimpleFilter('getReadingTime', 'Tools::getReadingTime');
         $this->tpl->addFilter($filter);
-        
-        # filter for simple filenames in config view
-        $filter = new Twig_SimpleFilter('getPrettyFilename', function($string) { return str_replace(ROOT, '', $string); });
-        $this->tpl->addFilter($filter);
     }
 
     private function install()
@@ -480,8 +476,8 @@ class Poche
         switch ($view)
         {
             case 'config':
-                $dev = $this->getPocheVersion('dev');
-                $prod = $this->getPocheVersion('prod');
+                $dev = trim($this->getPocheVersion('dev'));
+                $prod = trim($this->getPocheVersion('prod'));
                 $compare_dev = version_compare(POCHE, $dev);
                 $compare_prod = version_compare(POCHE, $prod);
                 $themes = $this->getInstalledThemes();
@@ -727,7 +723,7 @@ 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)));
-                $this->messages->add('s', _('welcome to your poche'));
+                $this->messages->add('s', _('welcome to your wallabag'));
                 Tools::logm('login successful');
                 Tools::redirect($referer);
             }
@@ -746,7 +742,6 @@ class Poche
     {
         $this->user = array();
         Session::logout();
-        $this->messages->add('s', _('see you soon!'));
         Tools::logm('logout');
         Tools::redirect();
     }
@@ -1010,6 +1005,7 @@ class Poche
             $token = substr(base64_encode(uniqid(mt_rand(), true)), 0, 20);
         }
 
+        $token = str_replace('+', '', $token);
         $this->store->updateUserConfig($this->user->getId(), 'token', $token);
         $currentConfig = $_SESSION['poche_user']->config;
         $currentConfig['token'] = $token;