Compare commits

..

1 Commits
2.2.3 ... 2.2.2

Author SHA1 Message Date
90e74c6337 Release wallabag 2.2.2 2017-03-02 14:47:51 +01:00
30 changed files with 907 additions and 1159 deletions

4
.gitignore vendored
View File

@ -51,7 +51,3 @@ bin
app/Resources/build/
!/src/Wallabag/CoreBundle/Resources/public
/src/Wallabag/CoreBundle/Resources/public/*
# Test-generated files
admin-export.json
specialexport.json

File diff suppressed because it is too large Load Diff

View File

@ -47,7 +47,7 @@ make release master /tmp wllbg-release prod
- [Create the new release on GitHub](https://github.com/wallabag/wallabag/releases/new). You have to upload on this page the package.
- Delete the `release-$LAST_WALLABAG_RELEASE` branch and close the pull request (**DO NOT MERGE IT**).
- Update the URL shortener (used on `wllbg.org` to generate links like `https://wllbg.org/latest-v2-package` or `http://wllbg.org/latest-v2`)
- Update the URL shortener (used on `wllbg.org` to generate links like `http://wllbg.org/latest-v2-package` or `http://wllbg.org/latest-v2`)
- Update [the downloads page](https://github.com/wallabag/wallabag.org/blob/master/content/pages/download.md) on the website (MD5 sum, release date)
- Update Dockerfile https://github.com/wallabag/docker (and create a new tag)
- Update wallabag.org website (downloads, releases and new blog post)

View File

@ -30,7 +30,7 @@ framework:
assets: ~
wallabag_core:
version: 2.2.3
version: 2.2.2
paypal_url: "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9UBA65LG3FX9Y&lc=gb"
languages:
en: 'English'

View File

@ -84,7 +84,7 @@
"javibravo/simpleue": "^1.0",
"symfony/dom-crawler": "^3.1",
"friendsofsymfony/jsrouting-bundle": "^1.6",
"bdunogier/guzzle-site-authenticator": "1.0.0-beta1"
"bdunogier/guzzle-site-authenticator": "dev-master"
},
"require-dev": {
"doctrine/doctrine-fixtures-bundle": "~2.2",
@ -115,7 +115,7 @@
"symfony-var-dir": "var",
"symfony-web-dir": "web",
"symfony-tests-dir": "tests",
"symfony-assets-install": "relative",
"symfony-assets-install": "symlink",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
}

608
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -61,7 +61,7 @@ Lade das letzte Release von wallabag herunter:
.. code-block:: bash
wget https://wllbg.org/latest-v2-package && tar xvf latest-v2-package
wget http://wllbg.org/latest-v2-package && tar xvf latest-v2-package
Du findest den `aktuellen MD5-Hash auf unserer Webseite <https://www.wallabag.org/pages/download-wallabag.html>`_.

View File

@ -6,16 +6,12 @@ wallabag can fetch articles from websites which use a paywall system.
Enable paywall authentication
-----------------------------
In internal settings, as a wallabag administrator, in the **Article** section, enable authentication for websites with paywall (with the value 1).
In internal settings, in the **Article** section, enable authentication for websites with paywall (with the value 1).
Configure credentials in wallabag
---------------------------------
Edit your ``app/config/parameters.yml`` file to edit credentials for each website with paywall. For example, under Ubuntu:
``sudo -u www-data nano /var/www/html/wallabag/app/config/parameters.yml``
Here is an example for some french websites (be careful: don't use the "tab" key, only spaces):
Edit your ``app/config/parameters.yml`` file to edit credentials for each website with paywall. Here is an example for some french websites:
.. code:: yaml
@ -32,7 +28,7 @@ Parsing configuration files
.. note::
Read `this part of the documentation <http://doc.wallabag.org/en/master/user/errors_during_fetching.html>`_ to understand the configuration files, which are located under ``vendor/j0k3r/graby-site-config/``. For most of the websites, this file is already configured: the following instructions are only for the websites that are not configured yet.
Read `this part of the documentation <http://doc.wallabag.org/en/master/user/errors_during_fetching.html>`_ to understand the configuration files.
Each parsing configuration file needs to be improved by adding ``requires_login``, ``login_uri``,
``login_username_field``, ``login_password_field`` and ``not_logged_in_xpath``.
@ -58,8 +54,3 @@ For example:
login_password_field: password
not_logged_in_xpath: //body[@class="not-logged-in"]
Last step: clear the cache
--------------------------
It's necessary to clear the wallabag cache with the following command (here under Ubuntu): ``sudo -u www-data php /var/www/html/wallabag/bin/console cache:clear -e=prod``

View File

@ -65,7 +65,7 @@ Download the last release of wallabag:
.. code-block:: bash
wget https://wllbg.org/latest-v2-package && tar xvf latest-v2-package
wget http://wllbg.org/latest-v2-package && tar xvf latest-v2-package
You will find the `md5 hash of the latest package on our website <https://www.wallabag.org/pages/download-wallabag.html>`_.

View File

@ -6,16 +6,12 @@ wallabag peut récupérer le contenu des articles des sites qui utilisent un sys
Activer l'authentification pour les paywall
-------------------------------------------
Dans les paramètres internes, en tant qu'administrateur de wallabag, section **Article**, activez l'authentification pour les articles derrière un paywall (avec la valeur 1).
Dans les paramètres internes, section **Article**, activez l'authentification pour les articles derrière un paywall (avec la valeur 1).
Configurer les accès dans wallabag
----------------------------------
Éditez le fichier ``app/config/parameters.yml`` pour modifier les accès aux sites avec paywall. Par exemple, sous Ubuntu :
``sudo -u www-data nano /var/www/html/wallabag/app/config/parameters.yml``
Voici un exemple pour certains sites (attention, ne pas utiliser la touche "tab", seulement des espaces) :
Éditez le fichier ``app/config/parameters.yml`` pour modifier les accès aux sites avec paywall. Voici un exemple pour certains sites :
.. code:: yaml
@ -32,7 +28,7 @@ Fichiers de configuration pour parser les articles
.. note::
Lisez `cette documentation <http://doc.wallabag.org/fr/master/user/errors_during_fetching.html>`_ pour en savoir plus sur ces fichiers de configuration, qui se trouvent dans le répertoire ``vendor/j0k3r/graby-site-config/``. Pour la majorité des sites, ce fichier est déjà configuré : les instructions qui suivent concernent seulement les sites non encore configurés.
Lisez `cette documentation <http://doc.wallabag.org/fr/master/user/errors_during_fetching.html>`_ pour en savoir plus sur ces fichiers de configuration.
Chaque fichier de configuration doit être enrichi en ajoutant ``requires_login``, ``login_uri``,
``login_username_field``, ``login_password_field`` et ``not_logged_in_xpath``.
@ -58,8 +54,3 @@ Par exemple :
login_password_field: password
not_logged_in_xpath: //body[@class="not-logged-in"]
Dernière étape : nettoyer le cache
----------------------------------
Il est nécessaire de nettoyer le cache de wallabag avec la commande suivante (ici sous Ubuntu) : ``sudo -u www-data php /var/www/html/wallabag/bin/console cache:clear -e=prod``

View File

@ -61,7 +61,7 @@ Téléchargez la dernière version de wallabag :
.. code-block:: bash
wget https://wllbg.org/latest-v2-package && tar xvf latest-v2-package
wget http://wllbg.org/latest-v2-package && tar xvf latest-v2-package
Vous trouverez `le hash md5 du dernier package sur notre site <https://www.wallabag.org/pages/download-wallabag.html>`_.

View File

@ -86,7 +86,7 @@ Eseguite questo comando per scaricare ed estrarre il pacchetto piú aggiornato:
.. code-block:: bash
wget https://wllbg.org/latest-v2-package && tar xvf latest-v2-package
wget http://wllbg.org/latest-v2-package && tar xvf latest-v2-package
Troverete il `hash md5 del pacchetto piú aggiornato sul nostro sito <https://www.wallabag.org/pages/download-wallabag.html>`_.

View File

@ -78,7 +78,7 @@ Scaricate l'ultima versione di wallabag:
. code-block:: bash
wget https://wllbg.org/latest-v2-package && tar xvf latest-v2-package
wget http://wllbg.org/latest-v2-package && tar xvf latest-v2-package
Troverete il `hash md5 dell'ultima versione del pacchetto sul nostro sito <https://www.wallabag.org/pages/download-wallabag.html>`_.

View File

@ -98,13 +98,12 @@ class EntryRestController extends WallabagRestController
$tags = $request->query->get('tags', '');
$since = $request->query->get('since', 0);
/** @var \Pagerfanta\Pagerfanta $pager */
$pager = $this->getDoctrine()
->getRepository('WallabagCoreBundle:Entry')
->findEntries($this->getUser()->getId(), $isArchived, $isStarred, $sort, $order, $since, $tags);
$pager->setMaxPerPage($perPage);
$pager->setCurrentPage($page);
$pager->setMaxPerPage($perPage);
$pagerfantaFactory = new PagerfantaFactory('page', 'perPage');
$paginatedCollection = $pagerfantaFactory->createRepresentation(
@ -200,19 +199,10 @@ class EntryRestController extends WallabagRestController
$entry = $this->get('wallabag_core.entry_repository')->findByUrlAndUserId($url, $this->getUser()->getId());
if (false === $entry) {
$entry = new Entry($this->getUser());
try {
$entry = $this->get('wallabag_core.content_proxy')->updateEntry(
$entry,
$url
);
} catch (\Exception $e) {
$this->get('logger')->error('Error while saving an entry', [
'exception' => $e,
'entry' => $entry,
]);
$entry->setUrl($url);
}
$entry = $this->get('wallabag_core.content_proxy')->updateEntry(
new Entry($this->getUser()),
$url
);
}
if (!is_null($title)) {

View File

@ -16,11 +16,7 @@ class ClientType extends AbstractType
{
$builder
->add('name', TextType::class, ['label' => 'developer.client.form.name_label'])
->add('redirect_uris', UrlType::class, [
'required' => false,
'label' => 'developer.client.form.redirect_uris_label',
'property_path' => 'redirectUris',
])
->add('redirect_uris', UrlType::class, ['required' => false, 'label' => 'developer.client.form.redirect_uris_label'])
->add('save', SubmitType::class, ['label' => 'developer.client.form.save_label'])
;

View File

@ -39,11 +39,9 @@ class ConfigType extends AbstractType
])
->add('items_per_page', null, [
'label' => 'config.form_settings.items_per_page_label',
'property_path' => 'itemsPerPage',
])
->add('reading_speed', ChoiceType::class, [
'label' => 'config.form_settings.reading_speed.label',
'property_path' => 'readingSpeed',
'choices' => [
'config.form_settings.reading_speed.100_word' => '0.5',
'config.form_settings.reading_speed.200_word' => '1',
@ -53,7 +51,6 @@ class ConfigType extends AbstractType
])
->add('action_mark_as_read', ChoiceType::class, [
'label' => 'config.form_settings.action_mark_as_read.label',
'property_path' => 'actionMarkAsRead',
'choices' => [
'config.form_settings.action_mark_as_read.redirect_homepage' => Config::REDIRECT_TO_HOMEPAGE,
'config.form_settings.action_mark_as_read.redirect_current_page' => Config::REDIRECT_TO_CURRENT_PAGE,
@ -64,7 +61,6 @@ class ConfigType extends AbstractType
'label' => 'config.form_settings.language_label',
])
->add('pocket_consumer_key', null, [
'property_path' => 'pocketConsumerKey',
'label' => 'config.form_settings.pocket_consumer_key_label',
])
->add('save', SubmitType::class, [

View File

@ -21,7 +21,6 @@ class EditEntryType extends AbstractType
->add('is_public', CheckboxType::class, [
'required' => false,
'label' => 'entry.edit.is_public_label',
'property_path' => 'isPublic',
])
->add('url', TextType::class, [
'disabled' => true,

View File

@ -3,7 +3,6 @@
namespace Wallabag\CoreBundle\Form\Type;
use Doctrine\ORM\EntityRepository;
use Lexik\Bundle\FormFilterBundle\Filter\FilterOperands;
use Lexik\Bundle\FormFilterBundle\Filter\Query\QueryInterface;
use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\NumberRangeFilterType;
use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\DateRangeFilterType;
@ -34,7 +33,7 @@ class EntryFilterType extends AbstractType
$this->user = $tokenStorage->getToken() ? $tokenStorage->getToken()->getUser() : null;
if (null === $this->user || !is_object($this->user)) {
return;
return null;
}
}
@ -42,14 +41,6 @@ class EntryFilterType extends AbstractType
{
$builder
->add('readingTime', NumberRangeFilterType::class, [
'left_number_options' => [
'condition_operator' => FilterOperands::OPERATOR_GREATER_THAN_EQUAL,
'attr' => ['min' => 0],
],
'right_number_options' => [
'condition_operator' => FilterOperands::OPERATOR_LOWER_THAN_EQUAL,
'attr' => ['min' => 0],
],
'apply_filter' => function (QueryInterface $filterQuery, $field, $values) {
$lower = $values['value']['left_number'][0];
$upper = $values['value']['right_number'][0];

View File

@ -14,7 +14,6 @@ class RssType extends AbstractType
$builder
->add('rss_limit', null, [
'label' => 'config.form_rss.rss_limit',
'property_path' => 'rssLimit',
])
->add('save', SubmitType::class, [
'label' => 'config.form.save',

View File

@ -144,8 +144,6 @@ class DownloadImages
$this->logger->debug('DownloadImages: Re-creating jpg');
break;
case 'png':
imagealphablending($im, false);
imagesavealpha($im, true);
imagepng($im, $localPath, ceil(self::REGENERATE_PICTURES_QUALITY / 100 * 9));
$this->logger->debug('DownloadImages: Re-creating png');
}

View File

@ -148,6 +148,8 @@ class EntriesExport
$book->setCoverImage('Cover.png', file_get_contents($this->logoPath), 'image/png');
}
$book->addChapter('Notices', 'Cover2.html', $content_start.$this->getExportInformation('PHPePub').$bookEnd);
$book->buildTOC();
/*
@ -168,8 +170,6 @@ class EntriesExport
$book->addChapter($entry->getTitle(), htmlspecialchars($filename).'.html', $chapter, true, EPub::EXTERNAL_REF_ADD);
}
$book->addChapter('Notices', 'Cover2.html', $content_start.$this->getExportInformation('PHPePub').$bookEnd);
return Response::create(
$book->getBook(),
200,

View File

@ -359,7 +359,7 @@ quickstart:
developer:
title: 'Developers'
description: 'We also thought to the developers: Docker, API, translations, etc.'
create_application: 'Create your third-party application'
create_application: 'Create your third application'
use_docker: 'Use Docker to install wallabag'
docs:
title: 'Full documentation'

View File

@ -3,7 +3,7 @@
<!--[if lte IE 7]><html class="no-js ie7 ie67 ie678" lang="en"><![endif]-->
<!--[if IE 8]><html class="no-js ie8 ie678" lang="en"><![endif]-->
<!--[if gt IE 8]><html class="no-js" lang="en"><![endif]-->
<html>
<html lang="fr">
<head>
{% block head %}
<meta name="viewport" content="initial-scale=1.0">

View File

@ -14,7 +14,7 @@
<ul>
<li><a href="{{ path('developer_howto_firstapp') }}">{{ 'developer.how_to_first_app'|trans }}</a></li>
<li><a href="https://doc.wallabag.org/en/developer/api/readme.html">{{ 'developer.full_documentation'|trans }}</a></li>
<li><a href="http://doc.wallabag.org/en/master/developer/api.html">{{ 'developer.full_documentation'|trans }}</a></li>
<li><a href="{{ path('nelmio_api_doc_index') }}">{{ 'developer.list_methods'|trans }}</a></li>
</ul>

View File

@ -34,10 +34,9 @@
<div id="set2" class="col s12">
<dl>
<dt>{{ 'about.getting_help.documentation'|trans }}</dt>
<dd><a href="https://doc.wallabag.org/en/">english</a></dd>
<dd><a href="https://doc.wallabag.org/fr/">français</a></dd>
<dd><a href="https://doc.wallabag.org/de/">deutsch</a></dd>
<dd><a href="https://doc.wallabag.org/it/">italiano</a></dd>
<dd><a href="http://doc.wallabag.org/en/master/">english</a></dd>
<dd><a href="http://doc.wallabag.org/fr/master/">français</a></dd>
<dd><a href="http://doc.wallabag.org/de/master/">deutsch</a></dd>
<dt>{{ 'about.getting_help.bug_reports'|trans }}</dt>
<dd>{{ 'about.getting_help.support'|trans|raw }}</dd>
@ -47,7 +46,7 @@
<div id="set3" class="col s12">
<dl>
<dt>{{ 'about.helping.description'|trans }}</dt>
<dd>{{ 'about.helping.by_contributing'|trans }} <a href="https://github.com/wallabag/wallabag/issues/1254">{{ 'about.helping.by_contributing_2'|trans }}</a></dd>
<dd>{{ 'about.helping.by_contributing_2'|trans }} <a href="https://github.com/wallabag/wallabag/issues/1254">{{ 'about.helping.by_contributing'|trans }}</a></dd>
<dd><a href="{{ paypal_url }}">{{ 'about.helping.by_paypal'|trans }}</a></dd>
</dl>
</div>
@ -107,8 +106,8 @@
<tr><td>hoa/zformat</td><td>BSD-3-Clause</td></tr>
<tr><td>htmlawed/htmlawed</td><td>GPL-2.0+ or LGPL-3.0</td></tr>
<tr><td>incenteev/composer-parameter-handler</td><td>MIT</td></tr>
<tr><td>j0k3r/graby</td><td>MIT</td></tr>
<tr><td>j0k3r/graby-site-config</td><td>Public domain</td></tr>
<tr><td>j0k3r/graby</td><td>AGPL-3.0</td></tr>
<tr><td>j0k3r/graby-site-config</td><td>AGPL-3.0</td></tr>
<tr><td>j0k3r/php-readability</td><td>Apache-2.0</td></tr>
<tr><td>j0k3r/safecurl</td><td>MIT</td></tr>
<tr><td>jdorn/sql-formatter</td><td>MIT</td></tr>

View File

@ -69,8 +69,8 @@
<div class="card-action">
<ul>
<li><a href="{{ path('developer') }}">{{ 'quickstart.developer.create_application'|trans }}</a></li>
<li><a href="https://doc.wallabag.org/en/developer/docker.html">{{ 'quickstart.developer.use_docker'|trans }}</a></li>
<li><a href="https://doc.wallabag.org/">{{ 'quickstart.more'|trans }}</a></li>
<li><a href="http://doc.wallabag.org/en/master/developer/docker.html">{{ 'quickstart.developer.use_docker'|trans }}</a></li>
<li><a href="http://doc.wallabag.org/en/master/index.html#dev-docs">{{ 'quickstart.more'|trans }}</a></li>
</ul>
</div>
</div>
@ -84,9 +84,9 @@
</div>
<div class="card-action">
<ul>
<li><a href="https://doc.wallabag.org/en/user/articles/annotations.html">{{ 'quickstart.docs.annotate'|trans }}</a></li>
<li><a href="https://doc.wallabag.org/en/user/articles/download.html">{{ 'quickstart.docs.export'|trans }}</a></li>
<li><a href="https://doc.wallabag.org/">{{ 'quickstart.docs.all_docs'|trans }}</a></li>
<li><a href="http://doc.wallabag.org/en/master/user/annotations.html">{{ 'quickstart.docs.annotate'|trans }}</a></li>
<li><a href="http://doc.wallabag.org/en/master/user/download_articles.html">{{ 'quickstart.docs.export'|trans }}</a></li>
<li><a href="http://doc.wallabag.org/">{{ 'quickstart.docs.all_docs'|trans }}</a></li>
</ul>
</div>
</div>

View File

@ -5,7 +5,7 @@
<div class="card-content">
{% if error %}
<script>Materialize.toast('{{ error.messageKey|trans(error.messageData, 'security') }}', 4000)</script>
<script>Materialize.toast('{{ error.message }}', 4000)</script>
{% endif %}
{% for flashMessage in app.session.flashbag.get('notice') %}

View File

@ -4,7 +4,6 @@ namespace Tests\Wallabag\ApiBundle\Controller;
use Tests\Wallabag\ApiBundle\WallabagApiTestCase;
use Wallabag\CoreBundle\Entity\Tag;
use Wallabag\CoreBundle\Helper\ContentProxy;
class EntryRestControllerTest extends WallabagApiTestCase
{
@ -157,22 +156,6 @@ class EntryRestControllerTest extends WallabagApiTestCase
$this->assertEquals('application/json', $this->client->getResponse()->headers->get('Content-Type'));
}
public function testGetEntriesOnPageTwo()
{
$this->client->request('GET', '/api/entries', [
'page' => 2,
'perPage' => 2,
]);
$this->assertEquals(200, $this->client->getResponse()->getStatusCode());
$content = json_decode($this->client->getResponse()->getContent(), true);
$this->assertGreaterThanOrEqual(0, $content['total']);
$this->assertEquals(2, $content['page']);
$this->assertEquals(2, $content['limit']);
}
public function testGetStarredEntries()
{
$this->client->request('GET', '/api/entries', ['starred' => 1, 'sort' => 'updated']);
@ -376,39 +359,6 @@ class EntryRestControllerTest extends WallabagApiTestCase
$this->assertCount(2, $content['tags']);
}
public function testPostEntryWhenFetchContentFails()
{
/** @var \Symfony\Component\DependencyInjection\Container $container */
$container = $this->client->getContainer();
$contentProxy = $this->getMockBuilder(ContentProxy::class)
->disableOriginalConstructor()
->setMethods(['updateEntry'])
->getMock();
$contentProxy->expects($this->any())
->method('updateEntry')
->willThrowException(new \Exception('Test Fetch content fails'));
$container->set('wallabag_core.content_proxy', $contentProxy);
try {
$this->client->request('POST', '/api/entries.json', [
'url' => 'http://www.example.com/',
]);
$this->assertEquals(200, $this->client->getResponse()->getStatusCode());
$content = json_decode($this->client->getResponse()->getContent(), true);
$this->assertGreaterThan(0, $content['id']);
$this->assertEquals('http://www.example.com/', $content['url']);
} finally {
// Remove the created entry to avoid side effects on other tests
if (isset($content['id'])) {
$em = $this->client->getContainer()->get('doctrine.orm.entity_manager');
$entry = $em->getReference('WallabagCoreBundle:Entry', $content['id']);
$em->remove($entry);
$em->flush();
}
}
}
public function testPostArchivedAndStarredEntry()
{
$this->client->request('POST', '/api/entries.json', [

View File

@ -591,26 +591,6 @@ class EntryControllerTest extends WallabagCoreTestCase
$this->assertCount(1, $crawler->filter('div[class=entry]'));
}
public function testFilterOnReadingTimeWithNegativeValue()
{
$this->logInAs('admin');
$client = $this->getClient();
$crawler = $client->request('GET', '/unread/list');
$form = $crawler->filter('button[id=submit-filter]')->form();
$data = [
'entry_filter[readingTime][right_number]' => -22,
'entry_filter[readingTime][left_number]' => -22,
];
$crawler = $client->submit($form, $data);
// forcing negative value results in no entry displayed
$this->assertCount(0, $crawler->filter('div[class=entry]'));
}
public function testFilterOnReadingTimeOnlyUpper()
{
$this->logInAs('admin');

View File

@ -633,6 +633,12 @@ class SymfonyRequirements extends RequirementCollection
'Install and enable the <strong>mbstring</strong> extension.'
);
$this->addRecommendation(
function_exists('iconv'),
'iconv() should be available',
'Install and enable the <strong>iconv</strong> extension.'
);
$this->addRecommendation(
function_exists('utf8_decode'),
'utf8_decode() should be available',