aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--inc/poche/Poche.class.php12
2 files changed, 5 insertions, 9 deletions
diff --git a/README.md b/README.md
index 6f950ad0..fe6a06b6 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
1# what is wallabag ? 1# what is wallabag ?
2wallabag is a self hostable application allowing you to not miss any content anymore. Click, save, read it when you can. It extracts content so that you can read it when you have time. 2wallabag is a self hostable application allowing you to not miss any content anymore. Click, save, read it when you can. It extracts content so that you can read it when you have time.
3 3
4To test wallabag, a demo website is online : [demo.wallabag.org](http://demo.wallabag.org) (login poche, password poche). 4More informations on our website: [wallabag.org](http://wallabag.org)
5 5
6## License 6## License
7Copyright © 2010-2013 Nicolas Lœuillet <nicolas@loeuillet.org> 7Copyright © 2010-2013 Nicolas Lœuillet <nicolas@loeuillet.org>
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php
index 74827253..9345d1c1 100644
--- a/inc/poche/Poche.class.php
+++ b/inc/poche/Poche.class.php
@@ -228,10 +228,6 @@ class Poche
228 # filter for reading time 228 # filter for reading time
229 $filter = new Twig_SimpleFilter('getReadingTime', 'Tools::getReadingTime'); 229 $filter = new Twig_SimpleFilter('getReadingTime', 'Tools::getReadingTime');
230 $this->tpl->addFilter($filter); 230 $this->tpl->addFilter($filter);
231
232 # filter for simple filenames in config view
233 $filter = new Twig_SimpleFilter('getPrettyFilename', function($string) { return str_replace(ROOT, '', $string); });
234 $this->tpl->addFilter($filter);
235 } 231 }
236 232
237 private function install() 233 private function install()
@@ -480,8 +476,8 @@ class Poche
480 switch ($view) 476 switch ($view)
481 { 477 {
482 case 'config': 478 case 'config':
483 $dev = $this->getPocheVersion('dev'); 479 $dev = trim($this->getPocheVersion('dev'));
484 $prod = $this->getPocheVersion('prod'); 480 $prod = trim($this->getPocheVersion('prod'));
485 $compare_dev = version_compare(POCHE, $dev); 481 $compare_dev = version_compare(POCHE, $dev);
486 $compare_prod = version_compare(POCHE, $prod); 482 $compare_prod = version_compare(POCHE, $prod);
487 $themes = $this->getInstalledThemes(); 483 $themes = $this->getInstalledThemes();
@@ -727,7 +723,7 @@ class Poche
727 $longlastingsession = isset($_POST['longlastingsession']); 723 $longlastingsession = isset($_POST['longlastingsession']);
728 $passwordTest = ($isauthenticated) ? $user['password'] : Tools::encodeString($password . $login); 724 $passwordTest = ($isauthenticated) ? $user['password'] : Tools::encodeString($password . $login);
729 Session::login($user['username'], $user['password'], $login, $passwordTest, $longlastingsession, array('poche_user' => new User($user))); 725 Session::login($user['username'], $user['password'], $login, $passwordTest, $longlastingsession, array('poche_user' => new User($user)));
730 $this->messages->add('s', _('welcome to your poche')); 726 $this->messages->add('s', _('welcome to your wallabag'));
731 Tools::logm('login successful'); 727 Tools::logm('login successful');
732 Tools::redirect($referer); 728 Tools::redirect($referer);
733 } 729 }
@@ -746,7 +742,6 @@ class Poche
746 { 742 {
747 $this->user = array(); 743 $this->user = array();
748 Session::logout(); 744 Session::logout();
749 $this->messages->add('s', _('see you soon!'));
750 Tools::logm('logout'); 745 Tools::logm('logout');
751 Tools::redirect(); 746 Tools::redirect();
752 } 747 }
@@ -1010,6 +1005,7 @@ class Poche
1010 $token = substr(base64_encode(uniqid(mt_rand(), true)), 0, 20); 1005 $token = substr(base64_encode(uniqid(mt_rand(), true)), 0, 20);
1011 } 1006 }
1012 1007
1008 $token = str_replace('+', '', $token);
1013 $this->store->updateUserConfig($this->user->getId(), 'token', $token); 1009 $this->store->updateUserConfig($this->user->getId(), 'token', $token);
1014 $currentConfig = $_SESSION['poche_user']->config; 1010 $currentConfig = $_SESSION['poche_user']->config;
1015 $currentConfig['token'] = $token; 1011 $currentConfig['token'] = $token;