]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Merge branch 'dev' of https://github.com/wallabag/wallabag into dev
authorNicolas Lœuillet <nicolas.loeuillet@gmail.com>
Wed, 12 Feb 2014 19:05:51 +0000 (20:05 +0100)
committerNicolas Lœuillet <nicolas.loeuillet@gmail.com>
Wed, 12 Feb 2014 19:05:51 +0000 (20:05 +0100)
1  2 
README.md
inc/poche/Poche.class.php

diff --combined README.md
index 4dc135222d8a51f93248882f5369d44080f9e09f,6f950ad0bd2c1e9d911aa6dedf90a4a572cef6af..fe6a06b61855524c4eb4b930cb90fdea73f260c4
+++ b/README.md
@@@ -1,10 -1,10 +1,10 @@@
  # what is wallabag ?
  wallabag 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.
  
 -To test wallabag, a demo website is online : [demo.wallabag.org](http://demo.wallabag.org) (login poche, password poche).
 +More informations on our website: [wallabag.org](http://wallabag.org)
  
  ## License
  Copyright © 2010-2013 Nicolas Lœuillet <nicolas@loeuillet.org>
  This work is free. You can redistribute it and/or modify it under the
  terms of the Do What The Fuck You Want To Public License, Version 2,
- as published by Sam Hocevar. See the COPYING file for more details.
+ as published by Sam Hocevar. See the COPYING file for more details.
index 7803198432b81515a69095b748611ec46e7d9cfd,74827253fa33cf906ce32d971c93b475a9646cbf..9345d1c1cd9a73bbbf4e863a7ce445e0be24fe0f
@@@ -228,6 -228,10 +228,6 @@@ class Poch
          # 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()
          {
              case 'add':
                  $content = $this->getPageContent($url);
-                 $title = $content['rss']['channel']['item']['title'];
+                 $title = ($content['rss']['channel']['item']['title'] != '') ? $content['rss']['channel']['item']['title'] : _('Untitled');
                  $body = $content['rss']['channel']['item']['description'];
  
                  if ($this->store->add($url->getUrl(), $title, $body, $this->user->getId())) {
          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();
                  
                  if (count($entries) > 0) {
                      $this->pagination->set_total(count($entries));
-                     $page_links = $this->pagination->page_links('?view=' . $view . '&sort=' . $_SESSION['sort'] . '&');
+                     $page_links = str_replace(array('previous', 'next'), array(_('previous'), _('next')),
+                         $this->pagination->page_links('?view=' . $view . '&sort=' . $_SESSION['sort'] . '&'));
                      $datas = $this->store->getEntriesByView($view, $this->user->getId(), $this->pagination->get_limit());
                      $tpl_vars['entries'] = $datas;
                      $tpl_vars['page_links'] = $page_links;
                  $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);
              }
      {
          $this->user = array();
          Session::logout();
 -        $this->messages->add('s', _('see you soon!'));
          Tools::logm('logout');
          Tools::redirect();
      }
              $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;