diff options
30 files changed, 236 insertions, 34 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index de523f91..ad916426 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md | |||
@@ -1,5 +1,10 @@ | |||
1 | ## Changelog | 1 | ## Changelog |
2 | 2 | ||
3 | ### 2.1.5 2016/11/21 | ||
4 | - [#2623](https://github.com/wallabag/wallabag/pull/2623) Force composer to run as PHP 5.5.9 (@j0k3r) | ||
5 | - [#2608](https://github.com/wallabag/wallabag/pull/2608) Change version to 2.2.0-dev (@nicosomb) | ||
6 | - [#2607](https://github.com/wallabag/wallabag/pull/2607) Updated changelog for 2.1.4 (@nicosomb) | ||
7 | |||
3 | ### 2.1.4 2016/11/19 | 8 | ### 2.1.4 2016/11/19 |
4 | - [#2604](https://github.com/wallabag/wallabag/pull/2604) wallabag can’t work on PostgreSQL <= 9.1 (@j0k3r) | 9 | - [#2604](https://github.com/wallabag/wallabag/pull/2604) wallabag can’t work on PostgreSQL <= 9.1 (@j0k3r) |
5 | - [#2605](https://github.com/wallabag/wallabag/pull/2605) Add .travis.yml change to RELEASE_PROCESS (@j0k3r) | 10 | - [#2605](https://github.com/wallabag/wallabag/pull/2605) Add .travis.yml change to RELEASE_PROCESS (@j0k3r) |
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml index 8ee0a303..fac3b4f8 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml | |||
@@ -1,3 +1,4 @@ | |||
1 | # settings_changed: Configuration updated | ||
1 | download_pictures: Download billeder på din server | 2 | download_pictures: Download billeder på din server |
2 | carrot: Aktiver deling til Carrot | 3 | carrot: Aktiver deling til Carrot |
3 | diaspora_url: Diaspora URL, hvis tjenesten er aktiv | 4 | diaspora_url: Diaspora URL, hvis tjenesten er aktiv |
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml index 73a9d640..d382733c 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml | |||
@@ -1,3 +1,4 @@ | |||
1 | # settings_changed: Configuration updated | ||
1 | download_pictures: Bilder auf den Server herunterladen | 2 | download_pictures: Bilder auf den Server herunterladen |
2 | carrot: Teilen zu Carrot aktivieren | 3 | carrot: Teilen zu Carrot aktivieren |
3 | diaspora_url: Diaspora-URL, sofern der Service aktiviert ist | 4 | diaspora_url: Diaspora-URL, sofern der Service aktiviert ist |
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml index c8c13805..23de7a43 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml | |||
@@ -1,3 +1,4 @@ | |||
1 | settings_changed: Configuration updated | ||
1 | download_pictures: Download pictures on your server | 2 | download_pictures: Download pictures on your server |
2 | carrot: Enable share to Carrot | 3 | carrot: Enable share to Carrot |
3 | diaspora_url: Diaspora URL, if the service is enabled | 4 | diaspora_url: Diaspora URL, if the service is enabled |
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml index 0ea98d8f..ff1dd04f 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml | |||
@@ -1,3 +1,4 @@ | |||
1 | # settings_changed: Configuration updated | ||
1 | download_pictures: Descargar imágenes | 2 | download_pictures: Descargar imágenes |
2 | carrot: Activar compartir con Carrot | 3 | carrot: Activar compartir con Carrot |
3 | diaspora_url: Diaspora URL, si el servicio está activado | 4 | diaspora_url: Diaspora URL, si el servicio está activado |
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml index c527b971..4e712fdd 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml | |||
@@ -1,3 +1,4 @@ | |||
1 | # settings_changed: Configuration updated | ||
1 | download_pictures: تصاویر را در کارگزار خودتان باربگیرید | 2 | download_pictures: تصاویر را در کارگزار خودتان باربگیرید |
2 | carrot: فعالسازی همرسانی به Carrot | 3 | carrot: فعالسازی همرسانی به Carrot |
3 | diaspora_url: نشانی Diaspora، اگر فعال بود | 4 | diaspora_url: نشانی Diaspora، اگر فعال بود |
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml index 176e7c86..cae4c662 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml | |||
@@ -1,3 +1,4 @@ | |||
1 | settings_changed: Configuration mise à jour | ||
1 | download_pictures: Télécharger les images sur le serveur | 2 | download_pictures: Télécharger les images sur le serveur |
2 | carrot: Activer le partage vers Carrot | 3 | carrot: Activer le partage vers Carrot |
3 | diaspora_url: URL de Diaspora, si le service Diaspora est activé | 4 | diaspora_url: URL de Diaspora, si le service Diaspora est activé |
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml index 621d4dcd..f94f834f 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml | |||
@@ -1,3 +1,4 @@ | |||
1 | # settings_changed: Configuration updated | ||
1 | download_pictures: Scarica le immagini sul tuo server | 2 | download_pictures: Scarica le immagini sul tuo server |
2 | carrot: Abilita la condivisione con Carrot | 3 | carrot: Abilita la condivisione con Carrot |
3 | diaspora_url: Diaspora URL, se il servizio è abilitato | 4 | diaspora_url: Diaspora URL, se il servizio è abilitato |
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml index 04accd45..de60a194 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml | |||
@@ -1,3 +1,4 @@ | |||
1 | # settings_changed: Configuration updated | ||
1 | download_pictures: Telecargar los imatges sul servidor | 2 | download_pictures: Telecargar los imatges sul servidor |
2 | carrot: Activar lo partatge cap a Carrot | 3 | carrot: Activar lo partatge cap a Carrot |
3 | diaspora_url: URL de Diaspora, se lo servici Diaspora es activat | 4 | diaspora_url: URL de Diaspora, se lo servici Diaspora es activat |
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml index 2f4f3154..11579745 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml | |||
@@ -1,3 +1,4 @@ | |||
1 | # settings_changed: Configuration updated | ||
1 | download_pictures: Pobierz obrazy na swój serwer | 2 | download_pictures: Pobierz obrazy na swój serwer |
2 | carrot: Włącz udostępnianie dla Carrot | 3 | carrot: Włącz udostępnianie dla Carrot |
3 | diaspora_url: Adres URL Diaspora, jeżeli usługa jest włączona | 4 | diaspora_url: Adres URL Diaspora, jeżeli usługa jest włączona |
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml index 5da940e9..74ae5a44 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml | |||
@@ -1,3 +1,4 @@ | |||
1 | # settings_changed: Configuration updated | ||
1 | download_pictures: Download imagens no seu servidor | 2 | download_pictures: Download imagens no seu servidor |
2 | carrot: Habilitar compartilhamento para o Carrot | 3 | carrot: Habilitar compartilhamento para o Carrot |
3 | diaspora_url: URL Diaspora, se o serviço está habilitado | 4 | diaspora_url: URL Diaspora, se o serviço está habilitado |
@@ -8,7 +9,8 @@ export_csv: Habilita exportação para CSV | |||
8 | export_json: Habilita exportação para JSON | 9 | export_json: Habilita exportação para JSON |
9 | export_txt: Habilita exportação para TXT | 10 | export_txt: Habilita exportação para TXT |
10 | export_xml: Habilita exportação para XML | 11 | export_xml: Habilita exportação para XML |
11 | pocket_consumer_key: Chave de consumidor do Pocket para importar conteúdo (https://getpocket.com/developer/docs/authentication) | 12 | # import_with_rabbitmq: Enable RabbitMQ to import data asynchronously |
13 | # import_with_redis: Enable Redis to import data asynchronously | ||
12 | shaarli_url: URL Shaarli, se o serviço está habilitado | 14 | shaarli_url: URL Shaarli, se o serviço está habilitado |
13 | share_diaspora: Habilitar compartilhamento para o Diaspora | 15 | share_diaspora: Habilitar compartilhamento para o Diaspora |
14 | share_mail: Habilitar compartilhamento por e-mail | 16 | share_mail: Habilitar compartilhamento por e-mail |
@@ -28,3 +30,5 @@ piwik_site_id: ID de seu website Piwik | |||
28 | piwik_enabled: Habilitar Piwik | 30 | piwik_enabled: Habilitar Piwik |
29 | demo_mode_enabled: "Habilitar modo demo? (somente usado para o demo público do wallabag)" | 31 | demo_mode_enabled: "Habilitar modo demo? (somente usado para o demo público do wallabag)" |
30 | demo_mode_username: "Usuário demo" | 32 | demo_mode_username: "Usuário demo" |
33 | # share_public: Allow public url for entries | ||
34 | # download_images_enabled: Download images locally | ||
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml index 6d2eaffd..5095dfa0 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml | |||
@@ -1,3 +1,4 @@ | |||
1 | # settings_changed: Configuration updated | ||
1 | download_pictures: Descarcă poze pe server | 2 | download_pictures: Descarcă poze pe server |
2 | carrot: Permite share către Carrot | 3 | carrot: Permite share către Carrot |
3 | diaspora_url: Diaspora URL, dacă serviciul este permis | 4 | diaspora_url: Diaspora URL, dacă serviciul este permis |
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.tr.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.tr.yml index 9146bfb6..cd42e595 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.tr.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.tr.yml | |||
@@ -1,3 +1,4 @@ | |||
1 | # settings_changed: Configuration updated | ||
1 | # download_pictures: Download pictures on your server | 2 | # download_pictures: Download pictures on your server |
2 | # carrot: Enable share to Carrot | 3 | # carrot: Enable share to Carrot |
3 | # diaspora_url: Diaspora URL, if the service is enabled | 4 | # diaspora_url: Diaspora URL, if the service is enabled |
diff --git a/app/config/config.yml b/app/config/config.yml index 53c26beb..487e934b 100644 --- a/app/config/config.yml +++ b/app/config/config.yml | |||
@@ -30,7 +30,7 @@ framework: | |||
30 | assets: ~ | 30 | assets: ~ |
31 | 31 | ||
32 | wallabag_core: | 32 | wallabag_core: |
33 | version: 2.2.0-dev | 33 | version: 2.1.5 |
34 | paypal_url: "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9UBA65LG3FX9Y&lc=gb" | 34 | paypal_url: "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9UBA65LG3FX9Y&lc=gb" |
35 | languages: | 35 | languages: |
36 | en: 'English' | 36 | en: 'English' |
@@ -218,7 +218,9 @@ fos_oauth_server: | |||
218 | auth_code_class: Wallabag\ApiBundle\Entity\AuthCode | 218 | auth_code_class: Wallabag\ApiBundle\Entity\AuthCode |
219 | service: | 219 | service: |
220 | user_provider: fos_user.user_manager | 220 | user_provider: fos_user.user_manager |
221 | 221 | options: | |
222 | refresh_token_lifetime: 1209600 | ||
223 | |||
222 | scheb_two_factor: | 224 | scheb_two_factor: |
223 | trusted_computer: | 225 | trusted_computer: |
224 | enabled: true | 226 | enabled: true |
diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist index 7a22cb98..f821f2a8 100644 --- a/app/config/parameters.yml.dist +++ b/app/config/parameters.yml.dist | |||
@@ -55,3 +55,4 @@ parameters: | |||
55 | redis_host: localhost | 55 | redis_host: localhost |
56 | redis_port: 6379 | 56 | redis_port: 6379 |
57 | redis_path: null | 57 | redis_path: null |
58 | redis_password: null | ||
diff --git a/composer.json b/composer.json index 6d7a7adf..1548d6ec 100644 --- a/composer.json +++ b/composer.json | |||
@@ -89,7 +89,7 @@ | |||
89 | "doctrine/doctrine-fixtures-bundle": "~2.2", | 89 | "doctrine/doctrine-fixtures-bundle": "~2.2", |
90 | "doctrine/data-fixtures": "~1.1.1", | 90 | "doctrine/data-fixtures": "~1.1.1", |
91 | "sensio/generator-bundle": "^3.0", | 91 | "sensio/generator-bundle": "^3.0", |
92 | "phpunit/phpunit": "~5.0", | 92 | "phpunit/phpunit": "~4.0", |
93 | "symfony/phpunit-bridge": "^3.0", | 93 | "symfony/phpunit-bridge": "^3.0", |
94 | "friendsofphp/php-cs-fixer": "~1.9", | 94 | "friendsofphp/php-cs-fixer": "~1.9", |
95 | "m6web/redis-mock": "^2.0" | 95 | "m6web/redis-mock": "^2.0" |
@@ -128,7 +128,10 @@ | |||
128 | "psr-4": { "Tests\\": "tests/" } | 128 | "psr-4": { "Tests\\": "tests/" } |
129 | }, | 129 | }, |
130 | "config": { | 130 | "config": { |
131 | "bin-dir": "bin" | 131 | "bin-dir": "bin", |
132 | "platform": { | ||
133 | "php": "5.5.9" | ||
134 | } | ||
132 | }, | 135 | }, |
133 | "minimum-stability": "dev", | 136 | "minimum-stability": "dev", |
134 | "prefer-stable": true | 137 | "prefer-stable": true |
diff --git a/docs/de/user/configuration.rst b/docs/de/user/configuration.rst index c0a8cd67..47c60f4c 100644 --- a/docs/de/user/configuration.rst +++ b/docs/de/user/configuration.rst | |||
@@ -52,6 +52,9 @@ Jetzt hast du drei Links, einen für jeden Status: Füge sie in deinem liebsten | |||
52 | 52 | ||
53 | Du kannst auch definieren wie viele Artikel du in deinem RSS Feed (Standardwert: 50) haben willst. | 53 | Du kannst auch definieren wie viele Artikel du in deinem RSS Feed (Standardwert: 50) haben willst. |
54 | 54 | ||
55 | There is also a pagination available for these feeds. You can add ``?page=2`` to jump to the second page. | ||
56 | The pagination follow `the RFC <https://tools.ietf.org/html/rfc5005#page-4>`_ about that, which means you'll find the ``next``, ``previous`` & ``last`` page link inside the `<channel>` tag of each RSS feed. | ||
57 | |||
55 | Benutzer-Informationen | 58 | Benutzer-Informationen |
56 | ---------------------- | 59 | ---------------------- |
57 | 60 | ||
diff --git a/docs/de/user/parameters.rst b/docs/de/user/parameters.rst index a5a4e4f2..8d8f9206 100644 --- a/docs/de/user/parameters.rst +++ b/docs/de/user/parameters.rst | |||
@@ -39,6 +39,7 @@ Wenn du nicht weißt, welchen Wert du setzen sollst, belasse es bei dem Standard | |||
39 | redis_host: localhost | 39 | redis_host: localhost |
40 | redis_port: 6379 | 40 | redis_port: 6379 |
41 | redis_path: null | 41 | redis_path: null |
42 | redis_password: null | ||
42 | 43 | ||
43 | Bedeutung von jedem Parameter | 44 | Bedeutung von jedem Parameter |
44 | ----------------------------- | 45 | ----------------------------- |
@@ -91,3 +92,4 @@ Bedeutung von jedem Parameter | |||
91 | "redis_host", "localhost", "IP oder Hostname des Zielservers (ignoriert bei Unix Schema)" | 92 | "redis_host", "localhost", "IP oder Hostname des Zielservers (ignoriert bei Unix Schema)" |
92 | "redis_port", "6379", "TCP/IP Port des Zielservers (ignoriert bei Unix Schema)" | 93 | "redis_port", "6379", "TCP/IP Port des Zielservers (ignoriert bei Unix Schema)" |
93 | "redis_path", "null", "Pfad zur Unix Domain Socket Datei, wenn Redis Unix Domain Sockets nutzt" | 94 | "redis_path", "null", "Pfad zur Unix Domain Socket Datei, wenn Redis Unix Domain Sockets nutzt" |
95 | "redis_password", "null", "Kennwort, welches in der Redis-Server-Konfiguration definiert ist (Parameter `requirepass` in `redis.conf`)" | ||
diff --git a/docs/en/user/configuration.rst b/docs/en/user/configuration.rst index a52d3ddd..caca834f 100644 --- a/docs/en/user/configuration.rst +++ b/docs/en/user/configuration.rst | |||
@@ -52,6 +52,9 @@ Now you have three links, one for each status: add them into your favourite RSS | |||
52 | 52 | ||
53 | You can also define how many articles you want in each RSS feed (default value: 50). | 53 | You can also define how many articles you want in each RSS feed (default value: 50). |
54 | 54 | ||
55 | There is also a pagination available for these feeds. You can add ``?page=2`` to jump to the second page. | ||
56 | The pagination follow `the RFC <https://tools.ietf.org/html/rfc5005#page-4>`_ about that, which means you'll find the ``next``, ``previous`` & ``last`` page link inside the `<channel>` tag of each RSS feed. | ||
57 | |||
55 | User information | 58 | User information |
56 | ---------------- | 59 | ---------------- |
57 | 60 | ||
diff --git a/docs/en/user/parameters.rst b/docs/en/user/parameters.rst index eb312f7e..d8a209e7 100644 --- a/docs/en/user/parameters.rst +++ b/docs/en/user/parameters.rst | |||
@@ -39,6 +39,7 @@ If you don't know which value you need to set, please leave the default one. | |||
39 | redis_host: localhost | 39 | redis_host: localhost |
40 | redis_port: 6379 | 40 | redis_port: 6379 |
41 | redis_path: null | 41 | redis_path: null |
42 | redis_password: null | ||
42 | 43 | ||
43 | Meaning of each parameter | 44 | Meaning of each parameter |
44 | ------------------------- | 45 | ------------------------- |
@@ -92,3 +93,4 @@ Meaning of each parameter | |||
92 | "redis_host", "localhost", "IP or hostname of the target server (ignored for unix scheme)" | 93 | "redis_host", "localhost", "IP or hostname of the target server (ignored for unix scheme)" |
93 | "redis_port", "6379", "TCP/IP port of the target server (ignored for unix scheme)" | 94 | "redis_port", "6379", "TCP/IP port of the target server (ignored for unix scheme)" |
94 | "redis_path", "null", "Path of the UNIX domain socket file used when connecting to Redis using UNIX domain sockets" | 95 | "redis_path", "null", "Path of the UNIX domain socket file used when connecting to Redis using UNIX domain sockets" |
96 | "redis_password", "null", "Password defined in the Redis server configuration (parameter `requirepass` in `redis.conf`)" | ||
diff --git a/docs/fr/user/configuration.rst b/docs/fr/user/configuration.rst index 5ce80f58..025b05bb 100644 --- a/docs/fr/user/configuration.rst +++ b/docs/fr/user/configuration.rst | |||
@@ -53,6 +53,9 @@ Vous avez maintenant trois liens, un par statut : ajoutez-les dans votre agrég | |||
53 | Vous pouvez aussi définir combien d'articles vous souhaitez dans vos flux RSS | 53 | Vous pouvez aussi définir combien d'articles vous souhaitez dans vos flux RSS |
54 | (50 est la valeur par défaut). | 54 | (50 est la valeur par défaut). |
55 | 55 | ||
56 | Une pagination est aussi disponible pour ces flux. Il suffit de rajouter ``?page=2`` pour aller à la seconde page, par exemple. | ||
57 | Cette pagination suit `la RFC <https://tools.ietf.org/html/rfc5005#page-4>`_, ce qui signifie que vous trouverez la page suivante (``next``), précédente (``previous``) et la dernière (``last``) dans la balise `<channel>` de chaque flux RSS. | ||
58 | |||
56 | Mon compte | 59 | Mon compte |
57 | ---------- | 60 | ---------- |
58 | 61 | ||
diff --git a/docs/fr/user/parameters.rst b/docs/fr/user/parameters.rst index d1c20ceb..b2e33524 100644 --- a/docs/fr/user/parameters.rst +++ b/docs/fr/user/parameters.rst | |||
@@ -39,6 +39,7 @@ Si vous ne savez pas quelle valeur vous devez mettre, laissez celle par défaut. | |||
39 | redis_host: localhost | 39 | redis_host: localhost |
40 | redis_port: 6379 | 40 | redis_port: 6379 |
41 | redis_path: null | 41 | redis_path: null |
42 | redis_password: null | ||
42 | 43 | ||
43 | Meaning of each parameter | 44 | Meaning of each parameter |
44 | ------------------------- | 45 | ------------------------- |
@@ -91,3 +92,4 @@ Meaning of each parameter | |||
91 | "redis_host", "localhost", "IP ou hôte du serveur cible (ignoré pour un schéma unix)" | 92 | "redis_host", "localhost", "IP ou hôte du serveur cible (ignoré pour un schéma unix)" |
92 | "redis_port", "6379", "Port TCP/IP du serveur cible (ignoré pour un schéma unix)" | 93 | "redis_port", "6379", "Port TCP/IP du serveur cible (ignoré pour un schéma unix)" |
93 | "redis_path", "null", "Chemin du fichier de socket du domaine UNIX utilisé quand on se connecte à Redis en utilisant les sockets du domaine UNIX" | 94 | "redis_path", "null", "Chemin du fichier de socket du domaine UNIX utilisé quand on se connecte à Redis en utilisant les sockets du domaine UNIX" |
95 | "redis_password", "null", "Mot de passe défini dans la configuration serveur de Redis (paramètre `requirepass` dans `redis.conf`)" | ||
diff --git a/src/Wallabag/ApiBundle/Controller/EntryRestController.php b/src/Wallabag/ApiBundle/Controller/EntryRestController.php index c5bf1df8..1a726b6e 100644 --- a/src/Wallabag/ApiBundle/Controller/EntryRestController.php +++ b/src/Wallabag/ApiBundle/Controller/EntryRestController.php | |||
@@ -286,6 +286,51 @@ class EntryRestController extends WallabagRestController | |||
286 | } | 286 | } |
287 | 287 | ||
288 | /** | 288 | /** |
289 | * Reload an entry. | ||
290 | * A response with HTTP Status 400 will be return if we weren't able to update the content (because it hasn't changed or we got an error). | ||
291 | * | ||
292 | * @ApiDoc( | ||
293 | * requirements={ | ||
294 | * {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"} | ||
295 | * } | ||
296 | * ) | ||
297 | * | ||
298 | * @return JsonResponse | ||
299 | */ | ||
300 | public function patchEntriesReloadAction(Entry $entry) | ||
301 | { | ||
302 | $this->validateAuthentication(); | ||
303 | $this->validateUserAccess($entry->getUser()->getId()); | ||
304 | |||
305 | try { | ||
306 | $entry = $this->get('wallabag_core.content_proxy')->updateEntry($entry, $entry->getUrl()); | ||
307 | } catch (\Exception $e) { | ||
308 | $this->get('logger')->error('Error while saving an entry', [ | ||
309 | 'exception' => $e, | ||
310 | 'entry' => $entry, | ||
311 | ]); | ||
312 | |||
313 | return new JsonResponse(['error' => 'Error while trying to fetch content'], 400); | ||
314 | } | ||
315 | |||
316 | // if refreshing entry failed, don't save it | ||
317 | if ($this->getParameter('wallabag_core.fetching_error_message') === $entry->getContent()) { | ||
318 | return new JsonResponse(['error' => 'Error while trying to extract content'], 400); | ||
319 | } | ||
320 | |||
321 | $em = $this->getDoctrine()->getManager(); | ||
322 | $em->persist($entry); | ||
323 | $em->flush(); | ||
324 | |||
325 | // entry saved, dispatch event about it! | ||
326 | $this->get('event_dispatcher')->dispatch(EntrySavedEvent::NAME, new EntrySavedEvent($entry)); | ||
327 | |||
328 | $json = $this->get('serializer')->serialize($entry, 'json'); | ||
329 | |||
330 | return (new JsonResponse())->setJson($json); | ||
331 | } | ||
332 | |||
333 | /** | ||
289 | * Delete **permanently** an entry. | 334 | * Delete **permanently** an entry. |
290 | * | 335 | * |
291 | * @ApiDoc( | 336 | * @ApiDoc( |
diff --git a/src/Wallabag/CoreBundle/Controller/RssController.php b/src/Wallabag/CoreBundle/Controller/RssController.php index 38e3b5a0..2290386f 100644 --- a/src/Wallabag/CoreBundle/Controller/RssController.php +++ b/src/Wallabag/CoreBundle/Controller/RssController.php | |||
@@ -3,12 +3,15 @@ | |||
3 | namespace Wallabag\CoreBundle\Controller; | 3 | namespace Wallabag\CoreBundle\Controller; |
4 | 4 | ||
5 | use Pagerfanta\Adapter\DoctrineORMAdapter; | 5 | use Pagerfanta\Adapter\DoctrineORMAdapter; |
6 | use Pagerfanta\Exception\OutOfRangeCurrentPageException; | ||
6 | use Pagerfanta\Pagerfanta; | 7 | use Pagerfanta\Pagerfanta; |
7 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; | 8 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; |
8 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | 9 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
10 | use Symfony\Component\HttpFoundation\Request; | ||
9 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; | 11 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
10 | use Wallabag\CoreBundle\Entity\Entry; | 12 | use Wallabag\CoreBundle\Entity\Entry; |
11 | use Wallabag\UserBundle\Entity\User; | 13 | use Wallabag\UserBundle\Entity\User; |
14 | use Symfony\Component\Routing\Generator\UrlGeneratorInterface; | ||
12 | 15 | ||
13 | class RssController extends Controller | 16 | class RssController extends Controller |
14 | { | 17 | { |
@@ -20,9 +23,9 @@ class RssController extends Controller | |||
20 | * | 23 | * |
21 | * @return \Symfony\Component\HttpFoundation\Response | 24 | * @return \Symfony\Component\HttpFoundation\Response |
22 | */ | 25 | */ |
23 | public function showUnreadAction(User $user) | 26 | public function showUnreadAction(Request $request, User $user) |
24 | { | 27 | { |
25 | return $this->showEntries('unread', $user); | 28 | return $this->showEntries('unread', $user, $request->query->get('page', 1)); |
26 | } | 29 | } |
27 | 30 | ||
28 | /** | 31 | /** |
@@ -33,9 +36,9 @@ class RssController extends Controller | |||
33 | * | 36 | * |
34 | * @return \Symfony\Component\HttpFoundation\Response | 37 | * @return \Symfony\Component\HttpFoundation\Response |
35 | */ | 38 | */ |
36 | public function showArchiveAction(User $user) | 39 | public function showArchiveAction(Request $request, User $user) |
37 | { | 40 | { |
38 | return $this->showEntries('archive', $user); | 41 | return $this->showEntries('archive', $user, $request->query->get('page', 1)); |
39 | } | 42 | } |
40 | 43 | ||
41 | /** | 44 | /** |
@@ -46,9 +49,9 @@ class RssController extends Controller | |||
46 | * | 49 | * |
47 | * @return \Symfony\Component\HttpFoundation\Response | 50 | * @return \Symfony\Component\HttpFoundation\Response |
48 | */ | 51 | */ |
49 | public function showStarredAction(User $user) | 52 | public function showStarredAction(Request $request, User $user) |
50 | { | 53 | { |
51 | return $this->showEntries('starred', $user); | 54 | return $this->showEntries('starred', $user, $request->query->get('page', 1)); |
52 | } | 55 | } |
53 | 56 | ||
54 | /** | 57 | /** |
@@ -57,10 +60,11 @@ class RssController extends Controller | |||
57 | * | 60 | * |
58 | * @param string $type Entries type: unread, starred or archive | 61 | * @param string $type Entries type: unread, starred or archive |
59 | * @param User $user | 62 | * @param User $user |
63 | * @param int $page | ||
60 | * | 64 | * |
61 | * @return \Symfony\Component\HttpFoundation\Response | 65 | * @return \Symfony\Component\HttpFoundation\Response |
62 | */ | 66 | */ |
63 | private function showEntries($type, User $user) | 67 | private function showEntries($type, User $user, $page = 1) |
64 | { | 68 | { |
65 | $repository = $this->getDoctrine()->getRepository('WallabagCoreBundle:Entry'); | 69 | $repository = $this->getDoctrine()->getRepository('WallabagCoreBundle:Entry'); |
66 | 70 | ||
@@ -87,8 +91,26 @@ class RssController extends Controller | |||
87 | $perPage = $user->getConfig()->getRssLimit() ?: $this->getParameter('wallabag_core.rss_limit'); | 91 | $perPage = $user->getConfig()->getRssLimit() ?: $this->getParameter('wallabag_core.rss_limit'); |
88 | $entries->setMaxPerPage($perPage); | 92 | $entries->setMaxPerPage($perPage); |
89 | 93 | ||
94 | $url = $this->generateUrl( | ||
95 | $type.'_rss', | ||
96 | [ | ||
97 | 'username' => $user->getUsername(), | ||
98 | 'token' => $user->getConfig()->getRssToken(), | ||
99 | ], | ||
100 | UrlGeneratorInterface::ABSOLUTE_URL | ||
101 | ); | ||
102 | |||
103 | try { | ||
104 | $entries->setCurrentPage((int) $page); | ||
105 | } catch (OutOfRangeCurrentPageException $e) { | ||
106 | if ($page > 1) { | ||
107 | return $this->redirect($url.'?page='.$entries->getNbPages(), 302); | ||
108 | } | ||
109 | } | ||
110 | |||
90 | return $this->render('@WallabagCore/themes/common/Entry/entries.xml.twig', [ | 111 | return $this->render('@WallabagCore/themes/common/Entry/entries.xml.twig', [ |
91 | 'type' => $type, | 112 | 'type' => $type, |
113 | 'url' => $url, | ||
92 | 'entries' => $entries, | 114 | 'entries' => $entries, |
93 | ]); | 115 | ]); |
94 | } | 116 | } |
diff --git a/src/Wallabag/CoreBundle/Resources/config/services.yml b/src/Wallabag/CoreBundle/Resources/config/services.yml index 0036f45e..0280bc18 100644 --- a/src/Wallabag/CoreBundle/Resources/config/services.yml +++ b/src/Wallabag/CoreBundle/Resources/config/services.yml | |||
@@ -110,6 +110,7 @@ services: | |||
110 | host: '%redis_host%' | 110 | host: '%redis_host%' |
111 | port: '%redis_port%' | 111 | port: '%redis_port%' |
112 | path: '%redis_path%' | 112 | path: '%redis_path%' |
113 | password: '%redis_password%' | ||
113 | 114 | ||
114 | wallabag_core.exception_controller: | 115 | wallabag_core.exception_controller: |
115 | class: Wallabag\CoreBundle\Controller\ExceptionController | 116 | class: Wallabag\CoreBundle\Controller\ExceptionController |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml index 38fc4ceb..c124b744 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml | |||
@@ -61,7 +61,7 @@ config: | |||
61 | save: 'Zapisz' | 61 | save: 'Zapisz' |
62 | form_settings: | 62 | form_settings: |
63 | theme_label: 'Temat' | 63 | theme_label: 'Temat' |
64 | items_per_page_label: 'Ilość elementóœ na stronie' | 64 | items_per_page_label: 'Ilość elementów na stronie' |
65 | language_label: 'Język' | 65 | language_label: 'Język' |
66 | reading_speed: | 66 | reading_speed: |
67 | label: 'Prędkość czytania' | 67 | label: 'Prędkość czytania' |
@@ -76,11 +76,11 @@ config: | |||
76 | redirect_current_page: 'do bieżącej strony' | 76 | redirect_current_page: 'do bieżącej strony' |
77 | pocket_consumer_key_label: 'Klucz klienta Pocket do importu zawartości' | 77 | pocket_consumer_key_label: 'Klucz klienta Pocket do importu zawartości' |
78 | android_configuration: Skonfiguruj swoją androidową aplikację | 78 | android_configuration: Skonfiguruj swoją androidową aplikację |
79 | # help_theme: "wallabag is customizable. You can choose your prefered theme here." | 79 | help_theme: "Dopasuj wallabag do swoich potrzeb. Tutaj możesz wybrać preferowany przez ciebie motyw." |
80 | # help_items_per_page: "You can change the number of articles displayed on each page." | 80 | help_items_per_page: "Możesz zmienić ilość artykułów wyświetlanych na każdej stronie." |
81 | # help_reading_speed: "wallabag calculates a reading time for each article. You can define here, thanks to this list, if you are a fast or a slow reader. wallabag will recalculate the reading time for each article." | 81 | help_reading_speed: "wallabag oblicza czas czytania każdego artykułu. Dzięki tej liście możesz określić swoje tempo. Wallabag przeliczy ponownie czas potrzebny, na przeczytanie każdego z artykułów." |
82 | # help_language: "You can change the language of wallabag interface." | 82 | help_language: "Możesz zmienić język interfejsu wallabag." |
83 | # help_pocket_consumer_key: "Required for Pocket import. You can create it in your Pocket account." | 83 | help_pocket_consumer_key: "Wymagane dla importu z Pocket. Możesz go stworzyć na swoim koncie Pocket." |
84 | form_rss: | 84 | form_rss: |
85 | description: 'Kanały RSS prowadzone przez wallabag pozwalają Ci na czytanie twoich zapisanych artykułów w twoium ulubionym czytniku RSS. Musisz najpierw wynegenerować tokena.' | 85 | description: 'Kanały RSS prowadzone przez wallabag pozwalają Ci na czytanie twoich zapisanych artykułów w twoium ulubionym czytniku RSS. Musisz najpierw wynegenerować tokena.' |
86 | token_label: 'Token RSS' | 86 | token_label: 'Token RSS' |
@@ -98,7 +98,7 @@ config: | |||
98 | name_label: 'Nazwa' | 98 | name_label: 'Nazwa' |
99 | email_label: 'Adres email' | 99 | email_label: 'Adres email' |
100 | twoFactorAuthentication_label: 'Autoryzacja dwuetapowa' | 100 | twoFactorAuthentication_label: 'Autoryzacja dwuetapowa' |
101 | # help_twoFactorAuthentication: "If you enable 2FA, each time you want to login to wallabag, you'll receive a code by email." | 101 | help_twoFactorAuthentication: "Jeżeli włączysz autoryzację dwuetapową. Za każdym razem, kiedy będziesz chciał się zalogować, dostaniesz kod na swój e-mail." |
102 | delete: | 102 | delete: |
103 | title: Usuń moje konto (niebezpieczna strefa !) | 103 | title: Usuń moje konto (niebezpieczna strefa !) |
104 | description: Jeżeli usuniesz swoje konto, wszystkie twoje artykuły, tagi, adnotacje, oraz konto zostaną trwale usunięte (operacja jest NIEODWRACALNA). Następnie zostaniesz wylogowany. | 104 | description: Jeżeli usuniesz swoje konto, wszystkie twoje artykuły, tagi, adnotacje, oraz konto zostaną trwale usunięte (operacja jest NIEODWRACALNA). Następnie zostaniesz wylogowany. |
@@ -112,7 +112,7 @@ config: | |||
112 | entries: usuń WSZYTSTKIE wpisy | 112 | entries: usuń WSZYTSTKIE wpisy |
113 | confirm: Jesteś pewien? (tej operacji NIE MOŻNA cofnąć) | 113 | confirm: Jesteś pewien? (tej operacji NIE MOŻNA cofnąć) |
114 | form_password: | 114 | form_password: |
115 | # description: "You can change your password here. Your new password should by at least 8 characters long." | 115 | description: "Tutaj możesz zmienić swoje hasło. Twoje nowe hasło powinno mieć conajmniej 8 znaków." |
116 | old_password_label: 'Stare hasło' | 116 | old_password_label: 'Stare hasło' |
117 | new_password_label: 'Nowe hasło' | 117 | new_password_label: 'Nowe hasło' |
118 | repeat_new_password_label: 'Powtórz nowe hasło' | 118 | repeat_new_password_label: 'Powtórz nowe hasło' |
@@ -162,7 +162,7 @@ entry: | |||
162 | archived: 'Zarchiwizowane wpisy' | 162 | archived: 'Zarchiwizowane wpisy' |
163 | filtered: 'Odfiltrowane wpisy' | 163 | filtered: 'Odfiltrowane wpisy' |
164 | filtered_tags: 'Filtrowane po tagach:' | 164 | filtered_tags: 'Filtrowane po tagach:' |
165 | # filtered_search: 'Filtered by search:' | 165 | filtered_search: 'Filtrowanie po wyszukiwaniu:' |
166 | untagged: 'Odtaguj wpisy' | 166 | untagged: 'Odtaguj wpisy' |
167 | list: | 167 | list: |
168 | number_on_the_page: '{0} Nie ma wpisów.|{1} Jest jeden wpis.|]1,Inf[ Są %count% wpisy.' | 168 | number_on_the_page: '{0} Nie ma wpisów.|{1} Jest jeden wpis.|]1,Inf[ Są %count% wpisy.' |
@@ -186,7 +186,7 @@ entry: | |||
186 | preview_picture_label: 'Posiada podgląd obrazu' | 186 | preview_picture_label: 'Posiada podgląd obrazu' |
187 | preview_picture_help: 'Podgląd obrazu' | 187 | preview_picture_help: 'Podgląd obrazu' |
188 | language_label: 'Język' | 188 | language_label: 'Język' |
189 | # http_status_label: 'HTTP status' | 189 | http_status_label: 'Status HTTP' |
190 | reading_time: | 190 | reading_time: |
191 | label: 'Czas czytania w minutach' | 191 | label: 'Czas czytania w minutach' |
192 | from: 'od' | 192 | from: 'od' |
@@ -229,7 +229,7 @@ entry: | |||
229 | form_new: | 229 | form_new: |
230 | url_label: Url | 230 | url_label: Url |
231 | search: | 231 | search: |
232 | # placeholder: 'What are you looking for?' | 232 | placeholder: 'Czego szukasz?' |
233 | edit: | 233 | edit: |
234 | page_title: 'Edytuj wpis' | 234 | page_title: 'Edytuj wpis' |
235 | title_label: 'Tytuł' | 235 | title_label: 'Tytuł' |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/entries.xml.twig b/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/entries.xml.twig index 288bb54f..16ecaa97 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/entries.xml.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/entries.xml.twig | |||
@@ -2,7 +2,15 @@ | |||
2 | <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:media="http://search.yahoo.com/mrss/"> | 2 | <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:media="http://search.yahoo.com/mrss/"> |
3 | <channel> | 3 | <channel> |
4 | <title>wallabag — {{type}} feed</title> | 4 | <title>wallabag — {{type}} feed</title> |
5 | <link>{{ url('unread') }}</link> | 5 | <link>{{ url(type) }}</link> |
6 | <link rel="self" href="{{ app.request.uri }}"/> | ||
7 | {% if entries.hasPreviousPage -%} | ||
8 | <link rel="previous" href="{{ url }}?page={{ entries.previousPage }}"/> | ||
9 | {% endif -%} | ||
10 | {% if entries.hasNextPage -%} | ||
11 | <link rel="next" href="{{ url }}?page={{ entries.nextPage }}"/> | ||
12 | {% endif -%} | ||
13 | <link rel="last" href="{{ url }}?page={{ entries.nbPages }}"/> | ||
6 | <pubDate>{{ "now"|date('D, d M Y H:i:s') }}</pubDate> | 14 | <pubDate>{{ "now"|date('D, d M Y H:i:s') }}</pubDate> |
7 | <generator>wallabag</generator> | 15 | <generator>wallabag</generator> |
8 | <description>wallabag {{type}} elements</description> | 16 | <description>wallabag {{type}} elements</description> |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/common/Static/quickstart.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/common/Static/quickstart.html.twig index c8a303a6..b7a48551 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/common/Static/quickstart.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/common/Static/quickstart.html.twig | |||
@@ -15,7 +15,7 @@ | |||
15 | <li class="col l4 m6 s12"> | 15 | <li class="col l4 m6 s12"> |
16 | <div class="card teal darken-1"> | 16 | <div class="card teal darken-1"> |
17 | <div class="card-content white-text"> | 17 | <div class="card-content white-text"> |
18 | <span class="card-title">{{ 'quickstart.configure.title'|trans }}</span> | 18 | <span class="card-title white-text">{{ 'quickstart.configure.title'|trans }}</span> |
19 | <p>{{ 'quickstart.configure.description'|trans }}</p> | 19 | <p>{{ 'quickstart.configure.description'|trans }}</p> |
20 | </div> | 20 | </div> |
21 | <div class="card-action"> | 21 | <div class="card-action"> |
@@ -31,7 +31,7 @@ | |||
31 | <li class="col l4 m6 s12"> | 31 | <li class="col l4 m6 s12"> |
32 | <div class="card green darken-1"> | 32 | <div class="card green darken-1"> |
33 | <div class="card-content white-text"> | 33 | <div class="card-content white-text"> |
34 | <span class="card-title">{{ 'quickstart.first_steps.title'|trans }}</span> | 34 | <span class="card-title white-text">{{ 'quickstart.first_steps.title'|trans }}</span> |
35 | <p>{{ 'quickstart.first_steps.description'|trans }}</p> | 35 | <p>{{ 'quickstart.first_steps.description'|trans }}</p> |
36 | </div> | 36 | </div> |
37 | <div class="card-action"> | 37 | <div class="card-action"> |
@@ -46,7 +46,7 @@ | |||
46 | <li class="col l4 m6 s12"> | 46 | <li class="col l4 m6 s12"> |
47 | <div class="card light-green darken-1"> | 47 | <div class="card light-green darken-1"> |
48 | <div class="card-content white-text"> | 48 | <div class="card-content white-text"> |
49 | <span class="card-title">{{ 'quickstart.migrate.title'|trans }}</span> | 49 | <span class="card-title white-text">{{ 'quickstart.migrate.title'|trans }}</span> |
50 | <p>{{ 'quickstart.migrate.description'|trans }}</p> | 50 | <p>{{ 'quickstart.migrate.description'|trans }}</p> |
51 | </div> | 51 | </div> |
52 | <div class="card-action"> | 52 | <div class="card-action"> |
@@ -63,7 +63,7 @@ | |||
63 | <li class="col l4 m6 s12"> | 63 | <li class="col l4 m6 s12"> |
64 | <div class="card blue darken-1"> | 64 | <div class="card blue darken-1"> |
65 | <div class="card-content white-text"> | 65 | <div class="card-content white-text"> |
66 | <span class="card-title">{{ 'quickstart.developer.title'|trans }}</span> | 66 | <span class="card-title white-text">{{ 'quickstart.developer.title'|trans }}</span> |
67 | <p>{{ 'quickstart.developer.description'|trans }}</p> | 67 | <p>{{ 'quickstart.developer.description'|trans }}</p> |
68 | </div> | 68 | </div> |
69 | <div class="card-action"> | 69 | <div class="card-action"> |
@@ -79,7 +79,7 @@ | |||
79 | <li class="col l4 m6 s12"> | 79 | <li class="col l4 m6 s12"> |
80 | <div class="card light-blue darken-1"> | 80 | <div class="card light-blue darken-1"> |
81 | <div class="card-content white-text"> | 81 | <div class="card-content white-text"> |
82 | <span class="card-title">{{ 'quickstart.docs.title'|trans }}</span> | 82 | <span class="card-title white-text">{{ 'quickstart.docs.title'|trans }}</span> |
83 | <p>{{ 'quickstart.docs.description'|trans }}</p> | 83 | <p>{{ 'quickstart.docs.description'|trans }}</p> |
84 | </div> | 84 | </div> |
85 | <div class="card-action"> | 85 | <div class="card-action"> |
@@ -95,7 +95,7 @@ | |||
95 | <li class="col l4 m6 s12"> | 95 | <li class="col l4 m6 s12"> |
96 | <div class="card cyan darken-1"> | 96 | <div class="card cyan darken-1"> |
97 | <div class="card-content white-text"> | 97 | <div class="card-content white-text"> |
98 | <span class="card-title">{{ 'quickstart.support.title'|trans }}</span> | 98 | <span class="card-title white-text">{{ 'quickstart.support.title'|trans }}</span> |
99 | <p>{{ 'quickstart.support.description'|trans }}</p> | 99 | <p>{{ 'quickstart.support.description'|trans }}</p> |
100 | </div> | 100 | </div> |
101 | <div class="card-action"> | 101 | <div class="card-action"> |
diff --git a/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php b/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php index 566e9493..432ce7d8 100644 --- a/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php +++ b/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php | |||
@@ -678,4 +678,44 @@ class EntryRestControllerTest extends WallabagApiTestCase | |||
678 | 678 | ||
679 | $this->assertEquals(403, $this->client->getResponse()->getStatusCode()); | 679 | $this->assertEquals(403, $this->client->getResponse()->getStatusCode()); |
680 | } | 680 | } |
681 | |||
682 | public function testReloadEntryErrorWhileFetching() | ||
683 | { | ||
684 | $entry = $this->client->getContainer()->get('doctrine.orm.entity_manager') | ||
685 | ->getRepository('WallabagCoreBundle:Entry') | ||
686 | ->findByUrlAndUserId('http://0.0.0.0/entry4', 1); | ||
687 | |||
688 | if (!$entry) { | ||
689 | $this->markTestSkipped('No content found in db.'); | ||
690 | } | ||
691 | |||
692 | $this->client->request('PATCH', '/api/entries/'.$entry->getId().'/reload.json'); | ||
693 | $this->assertEquals(400, $this->client->getResponse()->getStatusCode()); | ||
694 | |||
695 | $this->assertContains('Error while trying to extract content', $this->client->getResponse()->getContent()); | ||
696 | |||
697 | $this->assertEquals('application/json', $this->client->getResponse()->headers->get('Content-Type')); | ||
698 | } | ||
699 | |||
700 | public function testReloadEntry() | ||
701 | { | ||
702 | $this->client->request('POST', '/api/entries.json', [ | ||
703 | 'url' => 'http://www.lemonde.fr/pixels/article/2015/03/28/plongee-dans-l-univers-d-ingress-le-jeu-de-google-aux-frontieres-du-reel_4601155_4408996.html', | ||
704 | 'archive' => '1', | ||
705 | 'tags' => 'google, apple', | ||
706 | ]); | ||
707 | |||
708 | $json = json_decode($this->client->getResponse()->getContent(), true); | ||
709 | |||
710 | $this->setUp(); | ||
711 | |||
712 | $this->client->request('PATCH', '/api/entries/'.$json['id'].'/reload.json'); | ||
713 | $this->assertEquals(200, $this->client->getResponse()->getStatusCode()); | ||
714 | |||
715 | $content = json_decode($this->client->getResponse()->getContent(), true); | ||
716 | |||
717 | $this->assertNotEmpty($content['title']); | ||
718 | |||
719 | $this->assertEquals('application/json', $this->client->getResponse()->headers->get('Content-Type')); | ||
720 | } | ||
681 | } | 721 | } |
diff --git a/tests/Wallabag/CoreBundle/Controller/RssControllerTest.php b/tests/Wallabag/CoreBundle/Controller/RssControllerTest.php index fb6fe06a..5a59654d 100644 --- a/tests/Wallabag/CoreBundle/Controller/RssControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/RssControllerTest.php | |||
@@ -6,7 +6,7 @@ use Tests\Wallabag\CoreBundle\WallabagCoreTestCase; | |||
6 | 6 | ||
7 | class RssControllerTest extends WallabagCoreTestCase | 7 | class RssControllerTest extends WallabagCoreTestCase |
8 | { | 8 | { |
9 | public function validateDom($xml, $nb = null) | 9 | public function validateDom($xml, $type, $nb = null) |
10 | { | 10 | { |
11 | $doc = new \DOMDocument(); | 11 | $doc = new \DOMDocument(); |
12 | $doc->loadXML($xml); | 12 | $doc->loadXML($xml); |
@@ -22,6 +22,23 @@ class RssControllerTest extends WallabagCoreTestCase | |||
22 | $this->assertEquals(1, $xpath->query('/rss')->length); | 22 | $this->assertEquals(1, $xpath->query('/rss')->length); |
23 | $this->assertEquals(1, $xpath->query('/rss/channel')->length); | 23 | $this->assertEquals(1, $xpath->query('/rss/channel')->length); |
24 | 24 | ||
25 | $this->assertEquals(1, $xpath->query('/rss/channel/title')->length); | ||
26 | $this->assertEquals('wallabag — '.$type.' feed', $xpath->query('/rss/channel/title')->item(0)->nodeValue); | ||
27 | |||
28 | $this->assertEquals(1, $xpath->query('/rss/channel/pubDate')->length); | ||
29 | |||
30 | $this->assertEquals(1, $xpath->query('/rss/channel/generator')->length); | ||
31 | $this->assertEquals('wallabag', $xpath->query('/rss/channel/generator')->item(0)->nodeValue); | ||
32 | |||
33 | $this->assertEquals(1, $xpath->query('/rss/channel/description')->length); | ||
34 | $this->assertEquals('wallabag '.$type.' elements', $xpath->query('/rss/channel/description')->item(0)->nodeValue); | ||
35 | |||
36 | $this->assertEquals(1, $xpath->query('/rss/channel/link[@rel="self"]')->length); | ||
37 | $this->assertContains($type.'.xml', $xpath->query('/rss/channel/link[@rel="self"]')->item(0)->getAttribute('href')); | ||
38 | |||
39 | $this->assertEquals(1, $xpath->query('/rss/channel/link[@rel="last"]')->length); | ||
40 | $this->assertContains($type.'.xml?page=', $xpath->query('/rss/channel/link[@rel="last"]')->item(0)->getAttribute('href')); | ||
41 | |||
25 | foreach ($xpath->query('//item') as $item) { | 42 | foreach ($xpath->query('//item') as $item) { |
26 | $this->assertEquals(1, $xpath->query('title', $item)->length); | 43 | $this->assertEquals(1, $xpath->query('title', $item)->length); |
27 | $this->assertEquals(1, $xpath->query('source', $item)->length); | 44 | $this->assertEquals(1, $xpath->query('source', $item)->length); |
@@ -77,7 +94,7 @@ class RssControllerTest extends WallabagCoreTestCase | |||
77 | 94 | ||
78 | $this->assertEquals(200, $client->getResponse()->getStatusCode()); | 95 | $this->assertEquals(200, $client->getResponse()->getStatusCode()); |
79 | 96 | ||
80 | $this->validateDom($client->getResponse()->getContent(), 2); | 97 | $this->validateDom($client->getResponse()->getContent(), 'unread', 2); |
81 | } | 98 | } |
82 | 99 | ||
83 | public function testStarred() | 100 | public function testStarred() |
@@ -99,7 +116,7 @@ class RssControllerTest extends WallabagCoreTestCase | |||
99 | 116 | ||
100 | $this->assertEquals(200, $client->getResponse()->getStatusCode(), 1); | 117 | $this->assertEquals(200, $client->getResponse()->getStatusCode(), 1); |
101 | 118 | ||
102 | $this->validateDom($client->getResponse()->getContent()); | 119 | $this->validateDom($client->getResponse()->getContent(), 'starred'); |
103 | } | 120 | } |
104 | 121 | ||
105 | public function testArchives() | 122 | public function testArchives() |
@@ -121,6 +138,34 @@ class RssControllerTest extends WallabagCoreTestCase | |||
121 | 138 | ||
122 | $this->assertEquals(200, $client->getResponse()->getStatusCode()); | 139 | $this->assertEquals(200, $client->getResponse()->getStatusCode()); |
123 | 140 | ||
124 | $this->validateDom($client->getResponse()->getContent()); | 141 | $this->validateDom($client->getResponse()->getContent(), 'archive'); |
142 | } | ||
143 | |||
144 | public function testPagination() | ||
145 | { | ||
146 | $client = $this->getClient(); | ||
147 | $em = $client->getContainer()->get('doctrine.orm.entity_manager'); | ||
148 | $user = $em | ||
149 | ->getRepository('WallabagUserBundle:User') | ||
150 | ->findOneByUsername('admin'); | ||
151 | |||
152 | $config = $user->getConfig(); | ||
153 | $config->setRssToken('SUPERTOKEN'); | ||
154 | $config->setRssLimit(1); | ||
155 | $em->persist($config); | ||
156 | $em->flush(); | ||
157 | |||
158 | $client = $this->getClient(); | ||
159 | |||
160 | $client->request('GET', '/admin/SUPERTOKEN/unread.xml'); | ||
161 | $this->assertEquals(200, $client->getResponse()->getStatusCode()); | ||
162 | $this->validateDom($client->getResponse()->getContent(), 'unread'); | ||
163 | |||
164 | $client->request('GET', '/admin/SUPERTOKEN/unread.xml?page=2'); | ||
165 | $this->assertEquals(200, $client->getResponse()->getStatusCode()); | ||
166 | $this->validateDom($client->getResponse()->getContent(), 'unread'); | ||
167 | |||
168 | $client->request('GET', '/admin/SUPERTOKEN/unread.xml?page=3000'); | ||
169 | $this->assertEquals(302, $client->getResponse()->getStatusCode()); | ||
125 | } | 170 | } |
126 | } | 171 | } |