mirror of
https://github.com/wallabag/wallabag.git
synced 2025-12-25 08:07:34 +01:00
Compare commits
41 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 82307d88f2 | |||
| 6830d92558 | |||
| c0e8e6037b | |||
| afc9875f28 | |||
| 6b94ee51b8 | |||
| 4e88a6a651 | |||
| 8581fcae90 | |||
| 092ed4a787 | |||
| 8544c7e4b6 | |||
| 91ba9a5975 | |||
| a9357a8311 | |||
| a2ae05a61c | |||
| 1b1647175d | |||
| c829b06ed8 | |||
| 9d7d549712 | |||
| 832fbd94c0 | |||
| b60a666df2 | |||
| 08f29ae7b6 | |||
| f2beee5185 | |||
| f3c300e485 | |||
| 6603a9d649 | |||
| ab9eb5cdb7 | |||
| 1267905d28 | |||
| a7c8f54570 | |||
| 0f26c285d4 | |||
| 9579003045 | |||
| d49cdfe2ef | |||
| 8ee18fdabc | |||
| ef88b37eb5 | |||
| 138c352cd7 | |||
| f972af3f5b | |||
| 656395fde6 | |||
| 1b70990b01 | |||
| 548e608870 | |||
| 7a3260ae9e | |||
| 90f95027a8 | |||
| 7423ed4766 | |||
| 3f5f303e7f | |||
| cee28dc6d4 | |||
| 5301d664d9 | |||
| e316d4bd34 |
4
.gitignore
vendored
4
.gitignore
vendored
@ -51,3 +51,7 @@ bin
|
||||
app/Resources/build/
|
||||
!/src/Wallabag/CoreBundle/Resources/public
|
||||
/src/Wallabag/CoreBundle/Resources/public/*
|
||||
|
||||
# Test-generated files
|
||||
admin-export.json
|
||||
specialexport.json
|
||||
|
||||
1198
CHANGELOG.md
1198
CHANGELOG.md
File diff suppressed because it is too large
Load Diff
@ -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 `http://wllbg.org/latest-v2-package` or `http://wllbg.org/latest-v2`)
|
||||
- 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 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)
|
||||
|
||||
@ -30,7 +30,7 @@ framework:
|
||||
assets: ~
|
||||
|
||||
wallabag_core:
|
||||
version: 2.2.2
|
||||
version: 2.2.3
|
||||
paypal_url: "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9UBA65LG3FX9Y&lc=gb"
|
||||
languages:
|
||||
en: 'English'
|
||||
|
||||
@ -84,7 +84,7 @@
|
||||
"javibravo/simpleue": "^1.0",
|
||||
"symfony/dom-crawler": "^3.1",
|
||||
"friendsofsymfony/jsrouting-bundle": "^1.6",
|
||||
"bdunogier/guzzle-site-authenticator": "dev-master"
|
||||
"bdunogier/guzzle-site-authenticator": "1.0.0-beta1"
|
||||
},
|
||||
"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": "symlink",
|
||||
"symfony-assets-install": "relative",
|
||||
"incenteev-parameters": {
|
||||
"file": "app/config/parameters.yml"
|
||||
}
|
||||
|
||||
612
composer.lock
generated
612
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@ -61,7 +61,7 @@ Lade das letzte Release von wallabag herunter:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
wget http://wllbg.org/latest-v2-package && tar xvf latest-v2-package
|
||||
wget https://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>`_.
|
||||
|
||||
|
||||
@ -6,12 +6,16 @@ wallabag can fetch articles from websites which use a paywall system.
|
||||
Enable paywall authentication
|
||||
-----------------------------
|
||||
|
||||
In internal settings, in the **Article** section, enable authentication for websites with paywall (with the value 1).
|
||||
In internal settings, as a wallabag administrator, 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. Here is an example for some french websites:
|
||||
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):
|
||||
|
||||
.. code:: yaml
|
||||
|
||||
@ -28,7 +32,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.
|
||||
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.
|
||||
|
||||
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``.
|
||||
@ -54,3 +58,8 @@ 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``
|
||||
|
||||
@ -65,7 +65,7 @@ Download the last release of wallabag:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
wget http://wllbg.org/latest-v2-package && tar xvf latest-v2-package
|
||||
wget https://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>`_.
|
||||
|
||||
|
||||
@ -6,12 +6,16 @@ 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, section **Article**, activez l'authentification pour les articles derrière un paywall (avec la valeur 1).
|
||||
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).
|
||||
|
||||
Configurer les accès dans wallabag
|
||||
----------------------------------
|
||||
|
||||
Éditez le fichier ``app/config/parameters.yml`` pour modifier les accès aux sites avec paywall. Voici un exemple pour certains sites :
|
||||
É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) :
|
||||
|
||||
.. code:: yaml
|
||||
|
||||
@ -28,7 +32,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.
|
||||
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.
|
||||
|
||||
Chaque fichier de configuration doit être enrichi en ajoutant ``requires_login``, ``login_uri``,
|
||||
``login_username_field``, ``login_password_field`` et ``not_logged_in_xpath``.
|
||||
@ -54,3 +58,8 @@ 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``
|
||||
|
||||
@ -61,7 +61,7 @@ Téléchargez la dernière version de wallabag :
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
wget http://wllbg.org/latest-v2-package && tar xvf latest-v2-package
|
||||
wget https://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>`_.
|
||||
|
||||
|
||||
@ -86,7 +86,7 @@ Eseguite questo comando per scaricare ed estrarre il pacchetto piú aggiornato:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
wget http://wllbg.org/latest-v2-package && tar xvf latest-v2-package
|
||||
wget https://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>`_.
|
||||
|
||||
|
||||
@ -78,7 +78,7 @@ Scaricate l'ultima versione di wallabag:
|
||||
|
||||
. code-block:: bash
|
||||
|
||||
wget http://wllbg.org/latest-v2-package && tar xvf latest-v2-package
|
||||
wget https://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>`_.
|
||||
|
||||
|
||||
@ -98,12 +98,13 @@ 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->setCurrentPage($page);
|
||||
$pager->setMaxPerPage($perPage);
|
||||
$pager->setCurrentPage($page);
|
||||
|
||||
$pagerfantaFactory = new PagerfantaFactory('page', 'perPage');
|
||||
$paginatedCollection = $pagerfantaFactory->createRepresentation(
|
||||
@ -199,10 +200,19 @@ class EntryRestController extends WallabagRestController
|
||||
$entry = $this->get('wallabag_core.entry_repository')->findByUrlAndUserId($url, $this->getUser()->getId());
|
||||
|
||||
if (false === $entry) {
|
||||
$entry = $this->get('wallabag_core.content_proxy')->updateEntry(
|
||||
new Entry($this->getUser()),
|
||||
$url
|
||||
);
|
||||
$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);
|
||||
}
|
||||
}
|
||||
|
||||
if (!is_null($title)) {
|
||||
|
||||
@ -16,7 +16,11 @@ 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'])
|
||||
->add('redirect_uris', UrlType::class, [
|
||||
'required' => false,
|
||||
'label' => 'developer.client.form.redirect_uris_label',
|
||||
'property_path' => 'redirectUris',
|
||||
])
|
||||
->add('save', SubmitType::class, ['label' => 'developer.client.form.save_label'])
|
||||
;
|
||||
|
||||
|
||||
@ -39,9 +39,11 @@ 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',
|
||||
@ -51,6 +53,7 @@ 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,
|
||||
@ -61,6 +64,7 @@ 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, [
|
||||
|
||||
@ -21,6 +21,7 @@ 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,
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
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;
|
||||
@ -33,7 +34,7 @@ class EntryFilterType extends AbstractType
|
||||
$this->user = $tokenStorage->getToken() ? $tokenStorage->getToken()->getUser() : null;
|
||||
|
||||
if (null === $this->user || !is_object($this->user)) {
|
||||
return null;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@ -41,6 +42,14 @@ 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];
|
||||
|
||||
@ -14,6 +14,7 @@ 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',
|
||||
|
||||
@ -144,6 +144,8 @@ 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');
|
||||
}
|
||||
|
||||
@ -148,8 +148,6 @@ 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();
|
||||
|
||||
/*
|
||||
@ -170,6 +168,8 @@ 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,
|
||||
|
||||
@ -359,7 +359,7 @@ quickstart:
|
||||
developer:
|
||||
title: 'Developers'
|
||||
description: 'We also thought to the developers: Docker, API, translations, etc.'
|
||||
create_application: 'Create your third application'
|
||||
create_application: 'Create your third-party application'
|
||||
use_docker: 'Use Docker to install wallabag'
|
||||
docs:
|
||||
title: 'Full documentation'
|
||||
|
||||
@ -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 lang="fr">
|
||||
<html>
|
||||
<head>
|
||||
{% block head %}
|
||||
<meta name="viewport" content="initial-scale=1.0">
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
|
||||
<ul>
|
||||
<li><a href="{{ path('developer_howto_firstapp') }}">{{ 'developer.how_to_first_app'|trans }}</a></li>
|
||||
<li><a href="http://doc.wallabag.org/en/master/developer/api.html">{{ 'developer.full_documentation'|trans }}</a></li>
|
||||
<li><a href="https://doc.wallabag.org/en/developer/api/readme.html">{{ 'developer.full_documentation'|trans }}</a></li>
|
||||
<li><a href="{{ path('nelmio_api_doc_index') }}">{{ 'developer.list_methods'|trans }}</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
@ -34,9 +34,10 @@
|
||||
<div id="set2" class="col s12">
|
||||
<dl>
|
||||
<dt>{{ 'about.getting_help.documentation'|trans }}</dt>
|
||||
<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>
|
||||
<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>
|
||||
|
||||
<dt>{{ 'about.getting_help.bug_reports'|trans }}</dt>
|
||||
<dd>{{ 'about.getting_help.support'|trans|raw }}</dd>
|
||||
@ -46,7 +47,7 @@
|
||||
<div id="set3" class="col s12">
|
||||
<dl>
|
||||
<dt>{{ 'about.helping.description'|trans }}</dt>
|
||||
<dd>{{ 'about.helping.by_contributing_2'|trans }} <a href="https://github.com/wallabag/wallabag/issues/1254">{{ 'about.helping.by_contributing'|trans }}</a></dd>
|
||||
<dd>{{ 'about.helping.by_contributing'|trans }} <a href="https://github.com/wallabag/wallabag/issues/1254">{{ 'about.helping.by_contributing_2'|trans }}</a></dd>
|
||||
<dd><a href="{{ paypal_url }}">{{ 'about.helping.by_paypal'|trans }}</a></dd>
|
||||
</dl>
|
||||
</div>
|
||||
@ -106,8 +107,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>AGPL-3.0</td></tr>
|
||||
<tr><td>j0k3r/graby-site-config</td><td>AGPL-3.0</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/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>
|
||||
|
||||
@ -69,8 +69,8 @@
|
||||
<div class="card-action">
|
||||
<ul>
|
||||
<li><a href="{{ path('developer') }}">{{ 'quickstart.developer.create_application'|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>
|
||||
<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>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@ -84,9 +84,9 @@
|
||||
</div>
|
||||
<div class="card-action">
|
||||
<ul>
|
||||
<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>
|
||||
<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>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<div class="card-content">
|
||||
|
||||
{% if error %}
|
||||
<script>Materialize.toast('{{ error.message }}', 4000)</script>
|
||||
<script>Materialize.toast('{{ error.messageKey|trans(error.messageData, 'security') }}', 4000)</script>
|
||||
{% endif %}
|
||||
|
||||
{% for flashMessage in app.session.flashbag.get('notice') %}
|
||||
|
||||
@ -4,6 +4,7 @@ namespace Tests\Wallabag\ApiBundle\Controller;
|
||||
|
||||
use Tests\Wallabag\ApiBundle\WallabagApiTestCase;
|
||||
use Wallabag\CoreBundle\Entity\Tag;
|
||||
use Wallabag\CoreBundle\Helper\ContentProxy;
|
||||
|
||||
class EntryRestControllerTest extends WallabagApiTestCase
|
||||
{
|
||||
@ -156,6 +157,22 @@ 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']);
|
||||
@ -359,6 +376,39 @@ 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', [
|
||||
|
||||
@ -591,6 +591,26 @@ 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');
|
||||
|
||||
@ -633,12 +633,6 @@ 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',
|
||||
|
||||
Reference in New Issue
Block a user