Skip to content

Commit

Permalink
Merge pull request #450 from wallabag/dev
Browse files Browse the repository at this point in the history
1.5.0
  • Loading branch information
nicosomb committed Feb 13, 2014
2 parents 38dafee + 9f3148f commit 5e98c21
Show file tree
Hide file tree
Showing 88 changed files with 3,269 additions and 184 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
@@ -1,10 +1,10 @@
# How contributing

## You found a bug
Please [open a new issue](https://github.com/wallabag/demo.wallabag.org/issues/new).
Please [open a new issue](https://github.com/wallabag/wallabag/issues/new).

To fix the bug quickly, we need some infos:
* your demo.wallabag.org version (in ./index.php)
* your wallabag version (in ./index.php)
* the link you want to save and which causes problem

## You want to fix a bug or to add a feature
Expand Down
2 changes: 1 addition & 1 deletion CREDITS.md
Expand Up @@ -2,7 +2,7 @@ wallabag is based on :
* PHP Readability https://bitbucket.org/fivefilters/php-readability
* Full Text RSS http://code.fivefilters.org/full-text-rss/src
* Encoding https://github.com/neitanod/forceutf8
* logo by Brightmix http://www.iconfinder.com/icondetails/43256/128/jeans_monotone_pocket_icon
* logo by Maylis Agniel https://github.com/wallabag/logo
* icons http://icomoon.io
* PHP Simple HTML DOM Parser (for Pocket import) http://simplehtmldom.sourceforge.net/
* Session https://github.com/tontof/kriss_feed/blob/master/src/class/Session.php
Expand Down
2 changes: 1 addition & 1 deletion README.md
@@ -1,7 +1,7 @@
# 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>
Expand Down
1 change: 1 addition & 0 deletions cache/.gitignore
@@ -0,0 +1 @@
!.htaccess
2 changes: 2 additions & 0 deletions cache/.htaccess
@@ -0,0 +1,2 @@
Order deny,allow
Deny from all
2 changes: 2 additions & 0 deletions db/.htaccess
@@ -0,0 +1,2 @@
Order deny,allow
Deny from all
4 changes: 2 additions & 2 deletions inc/3rdparty/Session.class.php
Expand Up @@ -31,9 +31,9 @@ class Session
public static $sessionName = '';
// If the user does not access any page within this time,
// his/her session is considered expired (3600 sec. = 1 hour)
public static $inactivityTimeout = 3600;
public static $inactivityTimeout = 86400;
// Extra timeout for long sessions (if enabled) (82800 sec. = 23 hours)
public static $longSessionTimeout = 82800;
public static $longSessionTimeout = 31536000;
// If you get disconnected often or if your IP address changes often.
// Let you disable session cookie hijacking protection
public static $disableSessionProtection = false;
Expand Down
6 changes: 6 additions & 0 deletions inc/poche/Database.class.php
Expand Up @@ -318,6 +318,12 @@ public function archiveById($id, $user_id) {
$query = $this->executeQuery($sql_action, $params_action);
}

public function archiveAll($user_id) {
$sql_action = "UPDATE entries SET is_read=? WHERE user_id=? AND is_read=?";
$params_action = array($user_id, 1, 0);
$query = $this->executeQuery($sql_action, $params_action);
}

public function getLastId($column = '') {
return $this->getHandle()->lastInsertId($column);
}
Expand Down
28 changes: 16 additions & 12 deletions inc/poche/Poche.class.php
Expand Up @@ -101,7 +101,7 @@ public function themeIsInstalled() {
$passTheme = TRUE;
# Twig is an absolute requirement for Poche to function. Abort immediately if the Composer installer hasn't been run yet
if (! self::$canRenderTemplates) {
$this->notInstalledMessage[] = 'Twig does not seem to be installed. Please initialize the Composer installation to automatically fetch dependencies. Have a look at <a href="http://doc.wallabag.org/doku.php?id=users:begin:install">the documentation.</a>';
$this->notInstalledMessage[] = 'Twig does not seem to be installed. Please initialize the Composer installation to automatically fetch dependencies. You can also download <a href="http://wllbg.org/vendor">vendor.zip</a> and extract it in your wallabag folder.';
$passTheme = FALSE;
}

Expand Down Expand Up @@ -228,10 +228,6 @@ private function initTpl()
# 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()
Expand Down Expand Up @@ -438,6 +434,13 @@ public function action($action, Url $url, $id = 0, $import = FALSE, $autoclose =
Tools::redirect();
}
break;
case 'archive_all' :
$this->store->archiveAll($this->user->getId());
Tools::logm('archive all links');
if (!$import) {
Tools::redirect();
}
break;
case 'add_tag' :
$tags = explode(',', $_POST['value']);
$entry_id = $_POST['entry_id'];
Expand Down Expand Up @@ -480,8 +483,8 @@ function displayView($view, $id = 0)
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();
Expand Down Expand Up @@ -565,7 +568,8 @@ function displayView($view, $id = 0)

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;
Expand Down Expand Up @@ -726,7 +730,7 @@ public function login($referer)
$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);
}
Expand All @@ -745,7 +749,6 @@ public function logout()
{
$this->user = array();
Session::logout();
$this->messages->add('s', _('see you soon!'));
Tools::logm('logout');
Tools::redirect();
}
Expand Down Expand Up @@ -1009,6 +1012,7 @@ public function generateToken()
$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;
Expand All @@ -1027,10 +1031,10 @@ public function generateFeeds($token, $user_id, $tag_id, $type = 'home')
// Check the token

$feed = new FeedWriter(RSS2);
$feed->setTitle('poche - ' . $type . ' feed');
$feed->setTitle('wallabag — ' . $type . ' feed');
$feed->setLink(Tools::getPocheUrl());
$feed->setChannelElement('updated', date(DATE_RSS , time()));
$feed->setChannelElement('author', 'poche');
$feed->setChannelElement('author', 'wallabag');

if ($type == 'tag') {
$entries = $this->store->retrieveEntriesByTag($tag_id);
Expand Down
2 changes: 1 addition & 1 deletion inc/poche/config.inc.php.new
Expand Up @@ -44,7 +44,7 @@ define ('FLATTRABLE', '1');
define ('FLATTRED', '2');
define ('ABS_PATH', 'assets/');

define ('DEFAULT_THEME', 'default');
define ('DEFAULT_THEME', 'baggy');

define ('THEME', ROOT . '/themes');
define ('LOCALE', ROOT . '/locale');
Expand Down
2 changes: 1 addition & 1 deletion index.php
Expand Up @@ -8,7 +8,7 @@
* @license http://www.wtfpl.net/ see COPYING file
*/

define ('POCHE', '1.4.0');
define ('POCHE', '1.5.0');
require_once 'inc/poche/global.inc.php';
session_start();

Expand Down
Binary file modified install/poche.sqlite
Binary file not shown.
2 changes: 2 additions & 0 deletions locale/.htaccess
@@ -0,0 +1,2 @@
Order deny,allow
Deny from all
Binary file modified locale/cs_CZ.utf8/LC_MESSAGES/cs_CZ.utf8.mo
Binary file not shown.
Binary file modified locale/de_DE.utf8/LC_MESSAGES/de_DE.utf8.mo
Binary file not shown.
Binary file modified locale/en_EN.utf8/LC_MESSAGES/en_EN.utf8.mo
Binary file not shown.
Binary file modified locale/es_ES.utf8/LC_MESSAGES/es_ES.utf8.mo
Binary file not shown.
Binary file modified locale/fa_IR.utf8/LC_MESSAGES/fa_IR.utf8.mo
Binary file not shown.
Binary file modified locale/fr_FR.utf8/LC_MESSAGES/fr_FR.utf8.mo
Binary file not shown.
Binary file modified locale/it_IT.utf8/LC_MESSAGES/it_IT.utf8.mo
Binary file not shown.
Binary file added locale/pl_PL.utf8/LC_MESSAGES/pl_PL.utf8.mo
Binary file not shown.

0 comments on commit 5e98c21

Please sign in to comment.