aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--app/DoctrineMigrations/Version20161106113822.php42
-rw-r--r--docs/de/user/configuration.rst9
-rw-r--r--docs/en/user/configuration.rst9
-rw-r--r--docs/fr/user/configuration.rst9
-rw-r--r--src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php3
-rw-r--r--src/Wallabag/CoreBundle/Entity/Config.php27
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/ConfigType.php7
-rw-r--r--src/Wallabag/CoreBundle/Helper/Redirect.php9
-rw-r--r--src/Wallabag/CoreBundle/Resources/config/services.yml1
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.da.yml4
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.de.yml4
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.en.yml4
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.es.yml4
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml4
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml4
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.it.yml4
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml4
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml4
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml4
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml4
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml4
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig8
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig8
-rw-r--r--tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php1
-rw-r--r--tests/Wallabag/CoreBundle/Helper/DownloadImagesTest.php1
-rw-r--r--tests/Wallabag/CoreBundle/Helper/RedirectTest.php5
26 files changed, 184 insertions, 3 deletions
diff --git a/app/DoctrineMigrations/Version20161106113822.php b/app/DoctrineMigrations/Version20161106113822.php
new file mode 100644
index 00000000..41e64a4a
--- /dev/null
+++ b/app/DoctrineMigrations/Version20161106113822.php
@@ -0,0 +1,42 @@
1<?php
2
3namespace Application\Migrations;
4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema;
7
8class Version20161106113822 extends AbstractMigration
9{
10 /**
11 * @var ContainerInterface
12 */
13 private $container;
14
15 public function setContainer(ContainerInterface $container = null)
16 {
17 $this->container = $container;
18 }
19
20 private function getTable($tableName)
21 {
22 return $this->container->getParameter('database_table_prefix') . $tableName;
23 }
24
25 /**
26 * @param Schema $schema
27 */
28 public function up(Schema $schema)
29 {
30 $this->addSql('ALTER TABLE "'.$this->getTable('config').'" ADD action_mark_as_read INT DEFAULT 0');
31 }
32
33 /**
34 * @param Schema $schema
35 */
36 public function down(Schema $schema)
37 {
38 $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'sqlite', 'This down migration can\'t be executed on SQLite databases, because SQLite don\'t support DROP COLUMN.');
39
40 $this->addSql('ALTER TABLE "'.$this->getTable('config').'" DROP action_mark_as_read');
41 }
42}
diff --git a/docs/de/user/configuration.rst b/docs/de/user/configuration.rst
index 0b0793b1..7596a1d3 100644
--- a/docs/de/user/configuration.rst
+++ b/docs/de/user/configuration.rst
@@ -28,6 +28,15 @@ Lesegeschwindigkeit
28wallabag berechnet die Lesezeit für jeden Artikel. Du kannst hier definieren, dank dieser Liste, ob du 28wallabag berechnet die Lesezeit für jeden Artikel. Du kannst hier definieren, dank dieser Liste, ob du
29ein schneller oder langsamer Leser bist. wallabag wird die Lesezeit für jeden Artikel neu berechnen. 29ein schneller oder langsamer Leser bist. wallabag wird die Lesezeit für jeden Artikel neu berechnen.
30 30
31Where do you want to be redirected after mark an article as read?
32~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33
34Each time you'll do some actions (after marking an article as read/favorite,
35after deleting an article, after removing a tag from an entry), you can be redirected:
36
37- To the homepage
38- To the current page
39
31Sprache 40Sprache
32~~~~~~~ 41~~~~~~~
33 42
diff --git a/docs/en/user/configuration.rst b/docs/en/user/configuration.rst
index e7055a14..e16af12c 100644
--- a/docs/en/user/configuration.rst
+++ b/docs/en/user/configuration.rst
@@ -27,6 +27,15 @@ Reading speed
27wallabag calculates a reading time for each article. You can define here, thanks to this list, if you are 27wallabag calculates a reading time for each article. You can define here, thanks to this list, if you are
28a fast or a slow reader. wallabag will recalculate the reading time for each article. 28a fast or a slow reader. wallabag will recalculate the reading time for each article.
29 29
30Where do you want to be redirected after mark an article as read?
31~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32
33Each time you'll do some actions (after marking an article as read/favorite,
34after deleting an article, after removing a tag from an entry), you can be redirected:
35
36- To the homepage
37- To the current page
38
30Language 39Language
31~~~~~~~~ 40~~~~~~~~
32 41
diff --git a/docs/fr/user/configuration.rst b/docs/fr/user/configuration.rst
index 90eece11..c533b5c5 100644
--- a/docs/fr/user/configuration.rst
+++ b/docs/fr/user/configuration.rst
@@ -27,6 +27,15 @@ Vitesse de lecture
27 27
28wallabag calcule une durée de lecture pour chaque article. Vous pouvez définir ici, grâce à cette liste déroulante, si vous lisez plus ou moins vite. wallabag recalculera la durée de lecture de chaque article. 28wallabag calcule une durée de lecture pour chaque article. Vous pouvez définir ici, grâce à cette liste déroulante, si vous lisez plus ou moins vite. wallabag recalculera la durée de lecture de chaque article.
29 29
30Où souhaitez-vous être redirigé après avoir marqué un article comme lu ?
31~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32
33Chaque fois que vous ferez certaines actions (après avoir marqué un article comme lu / comme favori,
34après avoir supprimé un article, après avoir retiré un tag d'un article), vous pouvez être redirigé :
35
36- sur la page d'accueil
37- sur la page courante
38
30Langue 39Langue
31~~~~~~ 40~~~~~~
32 41
diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php
index 921c739f..45358022 100644
--- a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php
+++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php
@@ -21,6 +21,7 @@ class LoadConfigData extends AbstractFixture implements OrderedFixtureInterface
21 $adminConfig->setReadingSpeed(1); 21 $adminConfig->setReadingSpeed(1);
22 $adminConfig->setLanguage('en'); 22 $adminConfig->setLanguage('en');
23 $adminConfig->setPocketConsumerKey('xxxxx'); 23 $adminConfig->setPocketConsumerKey('xxxxx');
24 $adminConfig->setActionMarkAsRead(0);
24 25
25 $manager->persist($adminConfig); 26 $manager->persist($adminConfig);
26 27
@@ -32,6 +33,7 @@ class LoadConfigData extends AbstractFixture implements OrderedFixtureInterface
32 $bobConfig->setReadingSpeed(1); 33 $bobConfig->setReadingSpeed(1);
33 $bobConfig->setLanguage('fr'); 34 $bobConfig->setLanguage('fr');
34 $bobConfig->setPocketConsumerKey(null); 35 $bobConfig->setPocketConsumerKey(null);
36 $bobConfig->setActionMarkAsRead(1);
35 37
36 $manager->persist($bobConfig); 38 $manager->persist($bobConfig);
37 39
@@ -43,6 +45,7 @@ class LoadConfigData extends AbstractFixture implements OrderedFixtureInterface
43 $emptyConfig->setReadingSpeed(1); 45 $emptyConfig->setReadingSpeed(1);
44 $emptyConfig->setLanguage('en'); 46 $emptyConfig->setLanguage('en');
45 $emptyConfig->setPocketConsumerKey(null); 47 $emptyConfig->setPocketConsumerKey(null);
48 $emptyConfig->setActionMarkAsRead(0);
46 49
47 $manager->persist($emptyConfig); 50 $manager->persist($emptyConfig);
48 51
diff --git a/src/Wallabag/CoreBundle/Entity/Config.php b/src/Wallabag/CoreBundle/Entity/Config.php
index d0f0e3f3..c40d1535 100644
--- a/src/Wallabag/CoreBundle/Entity/Config.php
+++ b/src/Wallabag/CoreBundle/Entity/Config.php
@@ -88,6 +88,13 @@ class Config
88 private $pocketConsumerKey; 88 private $pocketConsumerKey;
89 89
90 /** 90 /**
91 * @var int
92 *
93 * @ORM\Column(name="action_mark_as_read", type="integer", nullable=true)
94 */
95 private $actionMarkAsRead;
96
97 /**
91 * @ORM\OneToOne(targetEntity="Wallabag\UserBundle\Entity\User", inversedBy="config") 98 * @ORM\OneToOne(targetEntity="Wallabag\UserBundle\Entity\User", inversedBy="config")
92 */ 99 */
93 private $user; 100 private $user;
@@ -310,6 +317,26 @@ class Config
310 } 317 }
311 318
312 /** 319 /**
320 * @return int
321 */
322 public function getActionMarkAsRead()
323 {
324 return $this->actionMarkAsRead;
325 }
326
327 /**
328 * @param int $actionMarkAsRead
329 *
330 * @return Config
331 */
332 public function setActionMarkAsRead($actionMarkAsRead)
333 {
334 $this->actionMarkAsRead = $actionMarkAsRead;
335
336 return $this;
337 }
338
339 /**
313 * @param TaggingRule $rule 340 * @param TaggingRule $rule
314 * 341 *
315 * @return Config 342 * @return Config
diff --git a/src/Wallabag/CoreBundle/Form/Type/ConfigType.php b/src/Wallabag/CoreBundle/Form/Type/ConfigType.php
index 0bac2874..3b1a8026 100644
--- a/src/Wallabag/CoreBundle/Form/Type/ConfigType.php
+++ b/src/Wallabag/CoreBundle/Form/Type/ConfigType.php
@@ -48,6 +48,13 @@ class ConfigType extends AbstractType
48 'config.form_settings.reading_speed.400_word' => '2', 48 'config.form_settings.reading_speed.400_word' => '2',
49 ], 49 ],
50 ]) 50 ])
51 ->add('action_mark_as_read', ChoiceType::class, [
52 'label' => 'config.form_settings.action_mark_as_read.label',
53 'choices' => [
54 'config.form_settings.action_mark_as_read.redirect_homepage' => '0',
55 'config.form_settings.action_mark_as_read.redirect_current_page' => '1',
56 ],
57 ])
51 ->add('language', ChoiceType::class, [ 58 ->add('language', ChoiceType::class, [
52 'choices' => array_flip($this->languages), 59 'choices' => array_flip($this->languages),
53 'label' => 'config.form_settings.language_label', 60 'label' => 'config.form_settings.language_label',
diff --git a/src/Wallabag/CoreBundle/Helper/Redirect.php b/src/Wallabag/CoreBundle/Helper/Redirect.php
index c14c79d1..918d9266 100644
--- a/src/Wallabag/CoreBundle/Helper/Redirect.php
+++ b/src/Wallabag/CoreBundle/Helper/Redirect.php
@@ -3,6 +3,7 @@
3namespace Wallabag\CoreBundle\Helper; 3namespace Wallabag\CoreBundle\Helper;
4 4
5use Symfony\Component\Routing\Router; 5use Symfony\Component\Routing\Router;
6use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage;
6 7
7/** 8/**
8 * Manage redirections to avoid redirecting to empty routes. 9 * Manage redirections to avoid redirecting to empty routes.
@@ -10,10 +11,12 @@ use Symfony\Component\Routing\Router;
10class Redirect 11class Redirect
11{ 12{
12 private $router; 13 private $router;
14 private $actionMarkAsRead;
13 15
14 public function __construct(Router $router) 16 public function __construct(Router $router, TokenStorage $token)
15 { 17 {
16 $this->router = $router; 18 $this->router = $router;
19 $this->actionMarkAsRead = $token->getToken()->getUser()->getConfig()->getActionMarkAsRead();
17 } 20 }
18 21
19 /** 22 /**
@@ -24,6 +27,10 @@ class Redirect
24 */ 27 */
25 public function to($url, $fallback = '') 28 public function to($url, $fallback = '')
26 { 29 {
30 if ($this->actionMarkAsRead == 0) {
31 return $this->router->generate('homepage');
32 }
33
27 if (null !== $url) { 34 if (null !== $url) {
28 return $url; 35 return $url;
29 } 36 }
diff --git a/src/Wallabag/CoreBundle/Resources/config/services.yml b/src/Wallabag/CoreBundle/Resources/config/services.yml
index 9786ac27..dad9bd42 100644
--- a/src/Wallabag/CoreBundle/Resources/config/services.yml
+++ b/src/Wallabag/CoreBundle/Resources/config/services.yml
@@ -109,6 +109,7 @@ services:
109 class: Wallabag\CoreBundle\Helper\Redirect 109 class: Wallabag\CoreBundle\Helper\Redirect
110 arguments: 110 arguments:
111 - "@router" 111 - "@router"
112 - "@security.token_storage"
112 113
113 wallabag_core.helper.prepare_pager_for_entries: 114 wallabag_core.helper.prepare_pager_for_entries:
114 class: Wallabag\CoreBundle\Helper\PreparePagerForEntries 115 class: Wallabag\CoreBundle\Helper\PreparePagerForEntries
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
index b66aa3ea..c24c5965 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
@@ -70,6 +70,10 @@ config:
70 # 200_word: 'I read ~200 words per minute' 70 # 200_word: 'I read ~200 words per minute'
71 # 300_word: 'I read ~300 words per minute' 71 # 300_word: 'I read ~300 words per minute'
72 # 400_word: 'I read ~400 words per minute' 72 # 400_word: 'I read ~400 words per minute'
73 action_mark_as_read:
74 # label: 'Where do you to be redirected after mark an article as read?'
75 # redirect_homepage: 'To the homepage'
76 # redirect_current_page: 'To the current page'
73 pocket_consumer_key_label: Brugers nøgle til Pocket for at importere materialer 77 pocket_consumer_key_label: Brugers nøgle til Pocket for at importere materialer
74 # android_configuration: Configure your Android application 78 # android_configuration: Configure your Android application
75 form_rss: 79 form_rss:
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
index 9e19dcc4..1b0bc026 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
@@ -70,6 +70,10 @@ config:
70 200_word: 'Ich lese ~200 Wörter pro Minute' 70 200_word: 'Ich lese ~200 Wörter pro Minute'
71 300_word: 'Ich lese ~300 Wörter pro Minute' 71 300_word: 'Ich lese ~300 Wörter pro Minute'
72 400_word: 'Ich lese ~400 Wörter pro Minute' 72 400_word: 'Ich lese ~400 Wörter pro Minute'
73 action_mark_as_read:
74 # label: 'Where do you to be redirected after mark an article as read?'
75 # redirect_homepage: 'To the homepage'
76 # redirect_current_page: 'To the current page'
73 pocket_consumer_key_label: Consumer-Key für Pocket, um Inhalte zu importieren 77 pocket_consumer_key_label: Consumer-Key für Pocket, um Inhalte zu importieren
74 # android_configuration: Configure your Android application 78 # android_configuration: Configure your Android application
75 form_rss: 79 form_rss:
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml
index 7516bbd5..b11dc778 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml
@@ -70,6 +70,10 @@ config:
70 200_word: 'I read ~200 words per minute' 70 200_word: 'I read ~200 words per minute'
71 300_word: 'I read ~300 words per minute' 71 300_word: 'I read ~300 words per minute'
72 400_word: 'I read ~400 words per minute' 72 400_word: 'I read ~400 words per minute'
73 action_mark_as_read:
74 label: 'Where do you want to be redirected after mark an article as read?'
75 redirect_homepage: 'To the homepage'
76 redirect_current_page: 'To the current page'
73 pocket_consumer_key_label: Consumer key for Pocket to import contents 77 pocket_consumer_key_label: Consumer key for Pocket to import contents
74 android_configuration: Configure your Android application 78 android_configuration: Configure your Android application
75 form_rss: 79 form_rss:
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
index 208982d9..15d0c3cf 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
@@ -70,6 +70,10 @@ config:
70 200_word: 'Leo ~200 palabras por minuto' 70 200_word: 'Leo ~200 palabras por minuto'
71 300_word: 'Leo ~300 palabras por minuto' 71 300_word: 'Leo ~300 palabras por minuto'
72 400_word: 'Leo ~400 palabras por minuto' 72 400_word: 'Leo ~400 palabras por minuto'
73 action_mark_as_read:
74 # label: 'Where do you to be redirected after mark an article as read?'
75 # redirect_homepage: 'To the homepage'
76 # redirect_current_page: 'To the current page'
73 # pocket_consumer_key_label: Consumer key for Pocket to import contents 77 # pocket_consumer_key_label: Consumer key for Pocket to import contents
74 # android_configuration: Configure your Android application 78 # android_configuration: Configure your Android application
75 form_rss: 79 form_rss:
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
index c443b21c..e7fa4f86 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
@@ -70,6 +70,10 @@ config:
70 200_word: 'من تقریباً ۲۰۰ واژه را در دقیقه می‌خوانم' 70 200_word: 'من تقریباً ۲۰۰ واژه را در دقیقه می‌خوانم'
71 300_word: 'من تقریباً ۳۰۰ واژه را در دقیقه می‌خوانم' 71 300_word: 'من تقریباً ۳۰۰ واژه را در دقیقه می‌خوانم'
72 400_word: 'من تقریباً ۴۰۰ واژه را در دقیقه می‌خوانم' 72 400_word: 'من تقریباً ۴۰۰ واژه را در دقیقه می‌خوانم'
73 action_mark_as_read:
74 # label: 'Where do you to be redirected after mark an article as read?'
75 # redirect_homepage: 'To the homepage'
76 # redirect_current_page: 'To the current page'
73 pocket_consumer_key_label: کلید کاربری Pocket برای درون‌ریزی مطالب 77 pocket_consumer_key_label: کلید کاربری Pocket برای درون‌ریزی مطالب
74 # android_configuration: Configure your Android application 78 # android_configuration: Configure your Android application
75 form_rss: 79 form_rss:
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
index ea759dd3..f85a797d 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
@@ -70,6 +70,10 @@ config:
70 200_word: "Je lis environ 200 mots par minute" 70 200_word: "Je lis environ 200 mots par minute"
71 300_word: "Je lis environ 300 mots par minute" 71 300_word: "Je lis environ 300 mots par minute"
72 400_word: "Je lis environ 400 mots par minute" 72 400_word: "Je lis environ 400 mots par minute"
73 action_mark_as_read:
74 label: 'Où souhaitez-vous être redirigé après avoir marqué un article comme lu ?'
75 redirect_homepage: "À la page d'accueil"
76 redirect_current_page: 'À la page courante'
73 pocket_consumer_key_label: Clé d’authentification Pocket pour importer les données 77 pocket_consumer_key_label: Clé d’authentification Pocket pour importer les données
74 android_configuration: Configurez votre application Android 78 android_configuration: Configurez votre application Android
75 form_rss: 79 form_rss:
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
index b3bc573b..8a8469d2 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
@@ -70,6 +70,10 @@ config:
70 200_word: 'Leggo ~200 parole al minuto' 70 200_word: 'Leggo ~200 parole al minuto'
71 300_word: 'Leggo ~300 parole al minuto' 71 300_word: 'Leggo ~300 parole al minuto'
72 400_word: 'Leggo ~400 parole al minuto' 72 400_word: 'Leggo ~400 parole al minuto'
73 action_mark_as_read:
74 # label: 'Where do you to be redirected after mark an article as read?'
75 # redirect_homepage: 'To the homepage'
76 # redirect_current_page: 'To the current page'
73 pocket_consumer_key_label: Consumer key per Pocket per importare i contenuti 77 pocket_consumer_key_label: Consumer key per Pocket per importare i contenuti
74 # android_configuration: Configure your Android application 78 # android_configuration: Configure your Android application
75 form_rss: 79 form_rss:
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
index 97b5f4a9..d37dc724 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
@@ -70,6 +70,10 @@ config:
70 200_word: "Legissi a l'entorn de 200 mots per minuta" 70 200_word: "Legissi a l'entorn de 200 mots per minuta"
71 300_word: "Legissi a l'entorn de 300 mots per minuta" 71 300_word: "Legissi a l'entorn de 300 mots per minuta"
72 400_word: "Legissi a l'entorn de 400 mots per minuta" 72 400_word: "Legissi a l'entorn de 400 mots per minuta"
73 action_mark_as_read:
74 # label: 'Where do you to be redirected after mark an article as read?'
75 # redirect_homepage: 'To the homepage'
76 # redirect_current_page: 'To the current page'
73 pocket_consumer_key_label: Clau d'autentificacion Pocket per importar las donadas 77 pocket_consumer_key_label: Clau d'autentificacion Pocket per importar las donadas
74 android_configuration: Configuratz vòstra aplicacion Android 78 android_configuration: Configuratz vòstra aplicacion Android
75 form_rss: 79 form_rss:
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
index b4212b83..117a1e12 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
@@ -70,6 +70,10 @@ config:
70 200_word: 'Czytam ~200 słów na minutę' 70 200_word: 'Czytam ~200 słów na minutę'
71 300_word: 'Czytam ~300 słów na minutę' 71 300_word: 'Czytam ~300 słów na minutę'
72 400_word: 'Czytam ~400 słów na minutę' 72 400_word: 'Czytam ~400 słów na minutę'
73 action_mark_as_read:
74 # label: 'Where do you to be redirected after mark an article as read?'
75 # redirect_homepage: 'To the homepage'
76 # redirect_current_page: 'To the current page'
73 pocket_consumer_key_label: 'Klucz klienta Pocket do importu zawartości' 77 pocket_consumer_key_label: 'Klucz klienta Pocket do importu zawartości'
74 android_configuration: Skonfiguruj swoją androidową aplikację 78 android_configuration: Skonfiguruj swoją androidową aplikację
75 form_rss: 79 form_rss:
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml
index d8fc9d5c..5d2607af 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml
@@ -70,6 +70,10 @@ config:
70 200_word: 'Posso ler ~200 palavras por minuto' 70 200_word: 'Posso ler ~200 palavras por minuto'
71 300_word: 'Posso ler ~300 palavras por minuto' 71 300_word: 'Posso ler ~300 palavras por minuto'
72 400_word: 'Posso ler ~400 palavras por minuto' 72 400_word: 'Posso ler ~400 palavras por minuto'
73 action_mark_as_read:
74 # label: 'Where do you to be redirected after mark an article as read?'
75 # redirect_homepage: 'To the homepage'
76 # redirect_current_page: 'To the current page'
73 pocket_consumer_key_label: 'Chave do consumidor do Pocket para importar conteúdo' 77 pocket_consumer_key_label: 'Chave do consumidor do Pocket para importar conteúdo'
74 # android_configuration: Configure your Android application 78 # android_configuration: Configure your Android application
75 form_rss: 79 form_rss:
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
index d130e431..6b51d9ce 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
@@ -70,6 +70,10 @@ config:
70 # 200_word: 'I read ~200 words per minute' 70 # 200_word: 'I read ~200 words per minute'
71 # 300_word: 'I read ~300 words per minute' 71 # 300_word: 'I read ~300 words per minute'
72 # 400_word: 'I read ~400 words per minute' 72 # 400_word: 'I read ~400 words per minute'
73 action_mark_as_read:
74 # label: 'Where do you to be redirected after mark an article as read?'
75 # redirect_homepage: 'To the homepage'
76 # redirect_current_page: 'To the current page'
73 pocket_consumer_key_label: Cheie consumator pentru importarea contentului din Pocket 77 pocket_consumer_key_label: Cheie consumator pentru importarea contentului din Pocket
74 # android_configuration: Configure your Android application 78 # android_configuration: Configure your Android application
75 form_rss: 79 form_rss:
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
index f67d8bee..9c392433 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
@@ -70,6 +70,10 @@ config:
70 # 200_word: 'I read ~200 words per minute' 70 # 200_word: 'I read ~200 words per minute'
71 # 300_word: 'I read ~300 words per minute' 71 # 300_word: 'I read ~300 words per minute'
72 # 400_word: 'I read ~400 words per minute' 72 # 400_word: 'I read ~400 words per minute'
73 action_mark_as_read:
74 # label: 'Where do you to be redirected after mark an article as read?'
75 # redirect_homepage: 'To the homepage'
76 # redirect_current_page: 'To the current page'
73 # pocket_consumer_key_label: Consumer key for Pocket to import contents 77 # pocket_consumer_key_label: Consumer key for Pocket to import contents
74 # android_configuration: Configure your Android application 78 # android_configuration: Configure your Android application
75 form_rss: 79 form_rss:
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig
index ec3b23c8..4c01b128 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig
@@ -38,6 +38,14 @@
38 38
39 <fieldset class="w500p inline"> 39 <fieldset class="w500p inline">
40 <div class="row"> 40 <div class="row">
41 {{ form_label(form.config.action_mark_as_read) }}
42 {{ form_errors(form.config.action_mark_as_read) }}
43 {{ form_widget(form.config.action_mark_as_read) }}
44 </div>
45 </fieldset>
46
47 <fieldset class="w500p inline">
48 <div class="row">
41 {{ form_label(form.config.language) }} 49 {{ form_label(form.config.language) }}
42 {{ form_errors(form.config.language) }} 50 {{ form_errors(form.config.language) }}
43 {{ form_widget(form.config.language) }} 51 {{ form_widget(form.config.language) }}
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig
index f69d158f..e774795b 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig
@@ -51,6 +51,14 @@
51 </div> 51 </div>
52 </div> 52 </div>
53 53
54 <div class="row">
55 <div class="input-field col s12">
56 {{ form_label(form.config.action_mark_as_read) }}
57 {{ form_errors(form.config.action_mark_as_read) }}
58 {{ form_widget(form.config.action_mark_as_read) }}
59 </div>
60 </div>
61
54 <div class="row"> 62 <div class="row">
55 <div class="input-field col s12"> 63 <div class="input-field col s12">
56 {{ form_label(form.config.language) }} 64 {{ form_label(form.config.language) }}
diff --git a/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php b/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php
index 568576a3..a2863014 100644
--- a/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php
+++ b/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php
@@ -51,6 +51,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
51 'config[theme]' => 'baggy', 51 'config[theme]' => 'baggy',
52 'config[items_per_page]' => '30', 52 'config[items_per_page]' => '30',
53 'config[reading_speed]' => '0.5', 53 'config[reading_speed]' => '0.5',
54 'config[action_mark_as_read]' => '0',
54 'config[language]' => 'en', 55 'config[language]' => 'en',
55 ]; 56 ];
56 57
diff --git a/tests/Wallabag/CoreBundle/Helper/DownloadImagesTest.php b/tests/Wallabag/CoreBundle/Helper/DownloadImagesTest.php
index 920c21d9..85f12d87 100644
--- a/tests/Wallabag/CoreBundle/Helper/DownloadImagesTest.php
+++ b/tests/Wallabag/CoreBundle/Helper/DownloadImagesTest.php
@@ -3,7 +3,6 @@
3namespace Tests\Wallabag\CoreBundle\Helper; 3namespace Tests\Wallabag\CoreBundle\Helper;
4 4
5use Wallabag\CoreBundle\Helper\DownloadImages; 5use Wallabag\CoreBundle\Helper\DownloadImages;
6use Psr\Log\NullLogger;
7use Monolog\Logger; 6use Monolog\Logger;
8use Monolog\Handler\TestHandler; 7use Monolog\Handler\TestHandler;
9use GuzzleHttp\Client; 8use GuzzleHttp\Client;
diff --git a/tests/Wallabag/CoreBundle/Helper/RedirectTest.php b/tests/Wallabag/CoreBundle/Helper/RedirectTest.php
index f339f75e..825e8d53 100644
--- a/tests/Wallabag/CoreBundle/Helper/RedirectTest.php
+++ b/tests/Wallabag/CoreBundle/Helper/RedirectTest.php
@@ -15,7 +15,10 @@ class RedirectTest extends \PHPUnit_Framework_TestCase
15 public function setUp() 15 public function setUp()
16 { 16 {
17 $this->routerMock = $this->getRouterMock(); 17 $this->routerMock = $this->getRouterMock();
18 $this->redirect = new Redirect($this->routerMock); 18 $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')
19 ->disableOriginalConstructor()
20 ->getMock();
21 $this->redirect = new Redirect($this->routerMock, $tokenStorage);
19 } 22 }
20 23
21 public function testRedirectToNullWithFallback() 24 public function testRedirectToNullWithFallback()