aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2019-04-25 14:12:56 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2019-04-26 12:53:21 +0200
commitf277bc042c8e805aab14b31b5b51e2878d80c6f4 (patch)
treeaf75f475af7bb2d0f8c3a44a404f90e2d93dfa2b
parent531c8d0a5c55fa93438e227a7d349235fbd31d28 (diff)
downloadwallabag-f277bc042c8e805aab14b31b5b51e2878d80c6f4.tar.gz
wallabag-f277bc042c8e805aab14b31b5b51e2878d80c6f4.tar.zst
wallabag-f277bc042c8e805aab14b31b5b51e2878d80c6f4.zip
Fix tests & cs & migration
-rw-r--r--app/DoctrineMigrations/Version20190425115043.php58
-rw-r--r--src/Wallabag/CoreBundle/Command/InstallCommand.php2
-rw-r--r--src/Wallabag/CoreBundle/Controller/FeedController.php27
-rw-r--r--src/Wallabag/CoreBundle/Entity/Config.php4
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml16
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.th.yml16
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/tags.html.twig2
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig2
-rw-r--r--src/Wallabag/CoreBundle/Twig/WallabagExtension.php2
-rw-r--r--src/Wallabag/UserBundle/Repository/UserRepository.php2
-rw-r--r--tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php2
-rw-r--r--tests/Wallabag/CoreBundle/Controller/FeedControllerTest.php54
-rw-r--r--tests/Wallabag/CoreBundle/Controller/SecurityControllerTest.php2
-rw-r--r--tests/Wallabag/CoreBundle/Twig/WallabagExtensionTest.php6
14 files changed, 126 insertions, 69 deletions
diff --git a/app/DoctrineMigrations/Version20190425115043.php b/app/DoctrineMigrations/Version20190425115043.php
new file mode 100644
index 00000000..4c5c49cc
--- /dev/null
+++ b/app/DoctrineMigrations/Version20190425115043.php
@@ -0,0 +1,58 @@
1<?php
2
3namespace Application\Migrations;
4
5use Doctrine\DBAL\Schema\Schema;
6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
7
8/**
9 * Rename rss_token & rss_limit to feed_token & feed_limit.
10 */
11final class Version20190425115043 extends WallabagMigration
12{
13 public function up(Schema $schema): void
14 {
15 switch ($this->connection->getDatabasePlatform()->getName()) {
16 case 'sqlite':
17 $this->addSql('DROP INDEX UNIQ_87E64C53A76ED395');
18 $this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('config', true) . ' AS SELECT id, user_id, theme, items_per_page, language, rss_token, rss_limit, reading_speed, pocket_consumer_key, action_mark_as_read, list_mode FROM ' . $this->getTable('config', true));
19 $this->addSql('DROP TABLE ' . $this->getTable('config', true));
20 $this->addSql('CREATE TABLE ' . $this->getTable('config', true) . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, user_id INTEGER DEFAULT NULL, theme VARCHAR(255) NOT NULL COLLATE BINARY, items_per_page INTEGER NOT NULL, language VARCHAR(255) NOT NULL COLLATE BINARY, reading_speed DOUBLE PRECISION DEFAULT NULL, pocket_consumer_key VARCHAR(255) DEFAULT NULL COLLATE BINARY, action_mark_as_read INTEGER DEFAULT 0, list_mode INTEGER DEFAULT NULL, feed_token VARCHAR(255) DEFAULT NULL, feed_limit INTEGER DEFAULT NULL, CONSTRAINT FK_87E64C53A76ED395 FOREIGN KEY (user_id) REFERENCES "wallabag_user" (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
21 $this->addSql('INSERT INTO ' . $this->getTable('config', true) . ' (id, user_id, theme, items_per_page, language, feed_token, feed_limit, reading_speed, pocket_consumer_key, action_mark_as_read, list_mode) SELECT id, user_id, theme, items_per_page, language, rss_token, rss_limit, reading_speed, pocket_consumer_key, action_mark_as_read, list_mode FROM __temp__' . $this->getTable('config', true));
22 $this->addSql('DROP TABLE __temp__' . $this->getTable('config', true));
23 $this->addSql('CREATE UNIQUE INDEX UNIQ_87E64C53A76ED395 ON ' . $this->getTable('config', true) . ' (user_id)');
24 break;
25 case 'mysql':
26 $this->addSql('ALTER TABLE ' . $this->getTable('config') . ' CHANGE rss_token feed_token VARCHAR(255) DEFAULT NULL');
27 $this->addSql('ALTER TABLE ' . $this->getTable('config') . ' CHANGE rss_limit feed_limit INT DEFAULT NULL');
28 break;
29 case 'postgresql':
30 $this->addSql('ALTER TABLE ' . $this->getTable('config') . ' RENAME COLUMN rss_token TO feed_token');
31 $this->addSql('ALTER TABLE ' . $this->getTable('config') . ' RENAME COLUMN rss_limit TO feed_limit');
32 break;
33 }
34 }
35
36 public function down(Schema $schema): void
37 {
38 switch ($this->connection->getDatabasePlatform()->getName()) {
39 case 'sqlite':
40 $this->addSql('DROP INDEX UNIQ_87E64C53A76ED395');
41 $this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('config', true) . ' AS SELECT id, user_id, theme, items_per_page, language, feed_token, feed_limit, reading_speed, pocket_consumer_key, action_mark_as_read, list_mode FROM "' . $this->getTable('config', true) . '"');
42 $this->addSql('DROP TABLE "' . $this->getTable('config', true) . '"');
43 $this->addSql('CREATE TABLE "' . $this->getTable('config', true) . '" (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, user_id INTEGER DEFAULT NULL, theme VARCHAR(255) NOT NULL, items_per_page INTEGER NOT NULL, language VARCHAR(255) NOT NULL, reading_speed DOUBLE PRECISION DEFAULT NULL, pocket_consumer_key VARCHAR(255) DEFAULT NULL, action_mark_as_read INTEGER DEFAULT 0, list_mode INTEGER DEFAULT NULL, rss_token VARCHAR(255) DEFAULT NULL COLLATE BINARY, rss_limit INTEGER DEFAULT NULL)');
44 $this->addSql('INSERT INTO "' . $this->getTable('config', true) . '" (id, user_id, theme, items_per_page, language, rss_token, rss_limit, reading_speed, pocket_consumer_key, action_mark_as_read, list_mode) SELECT id, user_id, theme, items_per_page, language, feed_token, feed_limit, reading_speed, pocket_consumer_key, action_mark_as_read, list_mode FROM __temp__' . $this->getTable('config', true));
45 $this->addSql('DROP TABLE __temp__' . $this->getTable('config', true));
46 $this->addSql('CREATE UNIQUE INDEX UNIQ_87E64C53A76ED395 ON "' . $this->getTable('config', true) . '" (user_id)');
47 break;
48 case 'mysql':
49 $this->addSql('ALTER TABLE ' . $this->getTable('config') . ' CHANGE feed_token rss_token');
50 $this->addSql('ALTER TABLE ' . $this->getTable('config') . ' CHANGE feed_limit rss_limit');
51 break;
52 case 'postgresql':
53 $this->addSql('ALTER TABLE ' . $this->getTable('config') . ' RENAME COLUMN feed_token TO rss_token');
54 $this->addSql('ALTER TABLE ' . $this->getTable('config') . ' RENAME COLUMN feed_limit TO rss_limit');
55 break;
56 }
57 }
58}
diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php
index 49c84178..c58ae2b5 100644
--- a/src/Wallabag/CoreBundle/Command/InstallCommand.php
+++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php
@@ -254,7 +254,7 @@ class InstallCommand extends ContainerAwareCommand
254 $question->setHidden(true); 254 $question->setHidden(true);
255 $user->setPlainPassword($this->io->askQuestion($question)); 255 $user->setPlainPassword($this->io->askQuestion($question));
256 256
257 $user->setEmail($this->io->ask('Email', '')); 257 $user->setEmail($this->io->ask('Email', 'wallabag@wallabag.io'));
258 258
259 $user->setEnabled(true); 259 $user->setEnabled(true);
260 $user->addRole('ROLE_SUPER_ADMIN'); 260 $user->addRole('ROLE_SUPER_ADMIN');
diff --git a/src/Wallabag/CoreBundle/Controller/FeedController.php b/src/Wallabag/CoreBundle/Controller/FeedController.php
index 9d55a9b7..8d422a90 100644
--- a/src/Wallabag/CoreBundle/Controller/FeedController.php
+++ b/src/Wallabag/CoreBundle/Controller/FeedController.php
@@ -8,7 +8,6 @@ use Pagerfanta\Exception\OutOfRangeCurrentPageException;
8use Pagerfanta\Pagerfanta; 8use Pagerfanta\Pagerfanta;
9use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; 9use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
10use Symfony\Bundle\FrameworkBundle\Controller\Controller; 10use Symfony\Bundle\FrameworkBundle\Controller\Controller;
11use Symfony\Component\HttpFoundation\Request;
12use Symfony\Component\HttpFoundation\Response; 11use Symfony\Component\HttpFoundation\Response;
13use Symfony\Component\Routing\Annotation\Route; 12use Symfony\Component\Routing\Annotation\Route;
14use Symfony\Component\Routing\Generator\UrlGeneratorInterface; 13use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
@@ -20,8 +19,8 @@ class FeedController extends Controller
20 /** 19 /**
21 * Shows unread entries for current user. 20 * Shows unread entries for current user.
22 * 21 *
23 * @Route("/feed/{username}/{token}/unread/{page}", name="unread_feed", defaults={"page": 1}) 22 * @Route("/feed/{username}/{token}/unread/{page}", name="unread_feed", defaults={"page"=1, "_format"="xml"})
24 * @Route("/{username}/{token}/unread.xml", defaults={"page": 1}) 23 *
25 * @ParamConverter("user", class="WallabagUserBundle:User", converter="username_feed_token_converter") 24 * @ParamConverter("user", class="WallabagUserBundle:User", converter="username_feed_token_converter")
26 * 25 *
27 * @param User $user 26 * @param User $user
@@ -37,8 +36,8 @@ class FeedController extends Controller
37 /** 36 /**
38 * Shows read entries for current user. 37 * Shows read entries for current user.
39 * 38 *
40 * @Route("/feed/{username}/{token}/archive/{page}", name="archive_feed", defaults={"page": 1}) 39 * @Route("/feed/{username}/{token}/archive/{page}", name="archive_feed", defaults={"page"=1, "_format"="xml"})
41 * @Route("/{username}/{token}/archive.xml", defaults={"page": 1}) 40 *
42 * @ParamConverter("user", class="WallabagUserBundle:User", converter="username_feed_token_converter") 41 * @ParamConverter("user", class="WallabagUserBundle:User", converter="username_feed_token_converter")
43 * 42 *
44 * @param User $user 43 * @param User $user
@@ -54,8 +53,8 @@ class FeedController extends Controller
54 /** 53 /**
55 * Shows starred entries for current user. 54 * Shows starred entries for current user.
56 * 55 *
57 * @Route("/feed/{username}/{token}/starred/{page}", name="starred_feed", defaults={"page": 1}) 56 * @Route("/feed/{username}/{token}/starred/{page}", name="starred_feed", defaults={"page"=1, "_format"="xml"})
58 * @Route("/{username}/{token}/starred.xml", defaults={"page": 1}) 57 *
59 * @ParamConverter("user", class="WallabagUserBundle:User", converter="username_feed_token_converter") 58 * @ParamConverter("user", class="WallabagUserBundle:User", converter="username_feed_token_converter")
60 * 59 *
61 * @param User $user 60 * @param User $user
@@ -71,29 +70,29 @@ class FeedController extends Controller
71 /** 70 /**
72 * Shows all entries for current user. 71 * Shows all entries for current user.
73 * 72 *
74 * @Route("/{username}/{token}/all.xml", name="all_feed", defaults={"_format"="xml"}) 73 * @Route("/feed/{username}/{token}/all/{page}", name="all_feed", defaults={"page"=1, "_format"="xml"})
74 *
75 * @ParamConverter("user", class="WallabagUserBundle:User", converter="username_feed_token_converter") 75 * @ParamConverter("user", class="WallabagUserBundle:User", converter="username_feed_token_converter")
76 * 76 *
77 * @return \Symfony\Component\HttpFoundation\Response 77 * @return \Symfony\Component\HttpFoundation\Response
78 */ 78 */
79 public function showAllFeedAction(Request $request, User $user) 79 public function showAllFeedAction(User $user, $page)
80 { 80 {
81 return $this->showEntries('all', $user, $request->query->get('page', 1)); 81 return $this->showEntries('all', $user, $page);
82 } 82 }
83 83
84 /** 84 /**
85 * Shows entries associated to a tag for current user. 85 * Shows entries associated to a tag for current user.
86 * 86 *
87 * @Route("/{username}/{token}/tags/{slug}.xml", name="tag_feed", defaults={"_format"="xml"}) 87 * @Route("/feed/{username}/{token}/tags/{slug}/{page}", name="tag_feed", defaults={"page"=1, "_format"="xml"})
88 *
88 * @ParamConverter("user", class="WallabagUserBundle:User", converter="username_feed_token_converter") 89 * @ParamConverter("user", class="WallabagUserBundle:User", converter="username_feed_token_converter")
89 * @ParamConverter("tag", options={"mapping": {"slug": "slug"}}) 90 * @ParamConverter("tag", options={"mapping": {"slug": "slug"}})
90 * 91 *
91 * @return \Symfony\Component\HttpFoundation\Response 92 * @return \Symfony\Component\HttpFoundation\Response
92 */ 93 */
93 public function showTagsFeedAction(Request $request, User $user, Tag $tag) 94 public function showTagsFeedAction(User $user, Tag $tag, $page)
94 { 95 {
95 $page = $request->query->get('page', 1);
96
97 $url = $this->generateUrl( 96 $url = $this->generateUrl(
98 'tag_feed', 97 'tag_feed',
99 [ 98 [
diff --git a/src/Wallabag/CoreBundle/Entity/Config.php b/src/Wallabag/CoreBundle/Entity/Config.php
index 7458f757..c6e65d66 100644
--- a/src/Wallabag/CoreBundle/Entity/Config.php
+++ b/src/Wallabag/CoreBundle/Entity/Config.php
@@ -60,14 +60,14 @@ class Config
60 /** 60 /**
61 * @var string 61 * @var string
62 * 62 *
63 * @ORM\Column(name="rss_token", type="string", nullable=true) 63 * @ORM\Column(name="feed_token", type="string", nullable=true)
64 */ 64 */
65 private $feedToken; 65 private $feedToken;
66 66
67 /** 67 /**
68 * @var int 68 * @var int
69 * 69 *
70 * @ORM\Column(name="rss_limit", type="integer", nullable=true) 70 * @ORM\Column(name="feed_limit", type="integer", nullable=true)
71 * @Assert\Range( 71 * @Assert\Range(
72 * min = 1, 72 * min = 1,
73 * max = 100000, 73 * max = 100000,
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml
index 92746631..2ee2d83a 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml
@@ -53,7 +53,7 @@ config:
53 page_title: 'Настройки' 53 page_title: 'Настройки'
54 tab_menu: 54 tab_menu:
55 settings: 'Настройки' 55 settings: 'Настройки'
56 rss: 'RSS' 56 feed: 'RSS'
57 user_info: 'Информация о пользователе' 57 user_info: 'Информация о пользователе'
58 password: 'Пароль' 58 password: 'Пароль'
59 rules: 'Правила настройки простановки тегов' 59 rules: 'Правила настройки простановки тегов'
@@ -83,18 +83,18 @@ config:
83 help_reading_speed: "wallabag посчитает сколько времени занимает чтение каждой записи. Вы можете определить здесь, как быстро вы читаете. wallabag пересчитает время чтения для каждой записи." 83 help_reading_speed: "wallabag посчитает сколько времени занимает чтение каждой записи. Вы можете определить здесь, как быстро вы читаете. wallabag пересчитает время чтения для каждой записи."
84 help_language: "Вы можете изменить язык интерфейса wallabag." 84 help_language: "Вы можете изменить язык интерфейса wallabag."
85 help_pocket_consumer_key: "Обязательно для импорта из Pocket. Вы можете создать это в Вашем аккаунте на Pocket." 85 help_pocket_consumer_key: "Обязательно для импорта из Pocket. Вы можете создать это в Вашем аккаунте на Pocket."
86 form_rss: 86 form_feed:
87 description: 'RSS фид созданный с помощью wallabag позволяет читать Ваши записи через Ваш любимый RSS агрегатор. Для начала Вам потребуется создать ключ.' 87 description: 'RSS фид созданный с помощью wallabag позволяет читать Ваши записи через Ваш любимый RSS агрегатор. Для начала Вам потребуется создать ключ.'
88 token_label: 'RSS ключ' 88 token_label: 'RSS ключ'
89 no_token: 'Ключ не задан' 89 no_token: 'Ключ не задан'
90 token_create: 'Создать ключ' 90 token_create: 'Создать ключ'
91 token_reset: 'Пересоздать ключ' 91 token_reset: 'Пересоздать ключ'
92 rss_links: 'ссылка на RSS' 92 feed_links: 'ссылка на RSS'
93 rss_link: 93 feed_link:
94 unread: 'непрочитанные' 94 unread: 'непрочитанные'
95 starred: 'помеченные' 95 starred: 'помеченные'
96 archive: 'архивные' 96 archive: 'архивные'
97 rss_limit: 'Количество записей в фиде' 97 feed_limit: 'Количество записей в фиде'
98 form_user: 98 form_user:
99 # two_factor_description: "Enabling two factor authentication means you'll receive an email with a code OR need to use an OTP app (like Google Authenticator, Authy or FreeOTP) to get a one time code on every new untrusted connection. You can't choose both option." 99 # two_factor_description: "Enabling two factor authentication means you'll receive an email with a code OR need to use an OTP app (like Google Authenticator, Authy or FreeOTP) to get a one time code on every new untrusted connection. You can't choose both option."
100 name_label: 'Имя' 100 name_label: 'Имя'
@@ -359,7 +359,7 @@ quickstart:
359 title: 'Настроить приложение' 359 title: 'Настроить приложение'
360 description: 'Чтобы иметь приложение, которое вам подходит, ознакомьтесь с конфигурацией wallabag.' 360 description: 'Чтобы иметь приложение, которое вам подходит, ознакомьтесь с конфигурацией wallabag.'
361 language: 'Выбрать язык и дизайн' 361 language: 'Выбрать язык и дизайн'
362 rss: 'Включить RSS фид' 362 feed: 'Включить RSS фид'
363 tagging_rules: 'Создать правило для автоматической установки тегов' 363 tagging_rules: 'Создать правило для автоматической установки тегов'
364 admin: 364 admin:
365 title: 'Администрирование' 365 title: 'Администрирование'
@@ -554,10 +554,10 @@ flashes:
554 password_updated: 'Пароль обновлен' 554 password_updated: 'Пароль обновлен'
555 password_not_updated_demo: "В режиме демонстрации нельзя изменять пароль для этого пользователя." 555 password_not_updated_demo: "В режиме демонстрации нельзя изменять пароль для этого пользователя."
556 user_updated: 'Информация обновлена' 556 user_updated: 'Информация обновлена'
557 rss_updated: 'RSS информация обновлена' 557 feed_updated: 'RSS информация обновлена'
558 tagging_rules_updated: 'Правила тегировния обновлены' 558 tagging_rules_updated: 'Правила тегировния обновлены'
559 tagging_rules_deleted: 'Правила тегировния удалены' 559 tagging_rules_deleted: 'Правила тегировния удалены'
560 rss_token_updated: 'RSS ключ обновлен' 560 feed_token_updated: 'RSS ключ обновлен'
561 annotations_reset: "Аннотации сброшены" 561 annotations_reset: "Аннотации сброшены"
562 tags_reset: "Теги сброшены" 562 tags_reset: "Теги сброшены"
563 entries_reset: "Записи сброшены" 563 entries_reset: "Записи сброшены"
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml
index 1fe4fa0e..e04eee68 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml
@@ -54,7 +54,7 @@ config:
54 page_title: 'กำหนดค่า' 54 page_title: 'กำหนดค่า'
55 tab_menu: 55 tab_menu:
56 settings: 'ตั้งค่า' 56 settings: 'ตั้งค่า'
57 rss: 'RSS' 57 feed: 'RSS'
58 user_info: 'ข้อมูลผู้ใช้' 58 user_info: 'ข้อมูลผู้ใช้'
59 password: 'รหัสผ่าน' 59 password: 'รหัสผ่าน'
60 rules: 'การแท็กข้อบังคับ' 60 rules: 'การแท็กข้อบังคับ'
@@ -85,19 +85,19 @@ config:
85 help_reading_speed: "wallabag จะคำนวณเวลาการอ่านในแต่ละรายการซึ่งคุณสามารถกำหนดได้ที่นี้,ต้องขอบคุณรายการนี้,หากคุณเป็นนักอ่านที่เร็วหรือช้า wallabag จะทำการคำนวณเวลาที่อ่านใหม่ในแต่ละรายการ" 85 help_reading_speed: "wallabag จะคำนวณเวลาการอ่านในแต่ละรายการซึ่งคุณสามารถกำหนดได้ที่นี้,ต้องขอบคุณรายการนี้,หากคุณเป็นนักอ่านที่เร็วหรือช้า wallabag จะทำการคำนวณเวลาที่อ่านใหม่ในแต่ละรายการ"
86 help_language: "คุณสามารถเปลี่ยภาษาของ wallabag interface ได้" 86 help_language: "คุณสามารถเปลี่ยภาษาของ wallabag interface ได้"
87 help_pocket_consumer_key: "การ้องขอการเก็บการนำข้อมูลเข้า คุณสามารถสร้างบัญชีการเก็บของคุณ" 87 help_pocket_consumer_key: "การ้องขอการเก็บการนำข้อมูลเข้า คุณสามารถสร้างบัญชีการเก็บของคุณ"
88 form_rss: 88 form_feed:
89 description: 'RSS จะเก็บเงื่อนไขโดย wallabag ต้องยอมรับการอ่านรายการของคุณกับผู้อ่านที่ชอบ RSS คุณต้องทำเครื่องหมายก่อน' 89 description: 'RSS จะเก็บเงื่อนไขโดย wallabag ต้องยอมรับการอ่านรายการของคุณกับผู้อ่านที่ชอบ RSS คุณต้องทำเครื่องหมายก่อน'
90 token_label: 'เครื่องหมาย RSS' 90 token_label: 'เครื่องหมาย RSS'
91 no_token: 'ไม่มีเครื่องหมาย' 91 no_token: 'ไม่มีเครื่องหมาย'
92 token_create: 'สร้างเครื่องหมาย' 92 token_create: 'สร้างเครื่องหมาย'
93 token_reset: 'ทำเครื่องหมาย' 93 token_reset: 'ทำเครื่องหมาย'
94 rss_links: 'ลิงค์ RSS' 94 feed_links: 'ลิงค์ RSS'
95 rss_link: 95 feed_link:
96 unread: 'ยังไมได้่อ่าน' 96 unread: 'ยังไมได้่อ่าน'
97 starred: 'ทำการแสดง' 97 starred: 'ทำการแสดง'
98 archive: 'เอกสาร' 98 archive: 'เอกสาร'
99 all: 'ทั้งหมด' 99 all: 'ทั้งหมด'
100 rss_limit: 'จำนวนไอเทมที่เก็บ' 100 feed_limit: 'จำนวนไอเทมที่เก็บ'
101 form_user: 101 form_user:
102 # two_factor_description: "Enabling two factor authentication means you'll receive an email with a code OR need to use an OTP app (like Google Authenticator, Authy or FreeOTP) to get a one time code on every new untrusted connection. You can't choose both option." 102 # two_factor_description: "Enabling two factor authentication means you'll receive an email with a code OR need to use an OTP app (like Google Authenticator, Authy or FreeOTP) to get a one time code on every new untrusted connection. You can't choose both option."
103 name_label: 'ชื่อ' 103 name_label: 'ชื่อ'
@@ -369,7 +369,7 @@ quickstart:
369 title: 'กำหนดค่าแอพพลิเคชั่น' 369 title: 'กำหนดค่าแอพพลิเคชั่น'
370 description: 'ภายใน order จะมี application suit ของคุณ, จะมองหาองค์ประกอบของ wallabag' 370 description: 'ภายใน order จะมี application suit ของคุณ, จะมองหาองค์ประกอบของ wallabag'
371 language: 'เปลี่ยนภาษาและออกแบบ' 371 language: 'เปลี่ยนภาษาและออกแบบ'
372 rss: 'เปิดใช้ RSS' 372 feed: 'เปิดใช้ RSS'
373 tagging_rules: 'เขียนข้อบังคับการแท็กอัตโนมัติของบทความของคุณ' 373 tagging_rules: 'เขียนข้อบังคับการแท็กอัตโนมัติของบทความของคุณ'
374 admin: 374 admin:
375 title: 'ผู้ดูแลระบบ' 375 title: 'ผู้ดูแลระบบ'
@@ -586,10 +586,10 @@ flashes:
586 password_updated: 'อัปเดตรหัสผ่าน' 586 password_updated: 'อัปเดตรหัสผ่าน'
587 password_not_updated_demo: "In demonstration mode, you can't change password for this user." 587 password_not_updated_demo: "In demonstration mode, you can't change password for this user."
588 user_updated: 'อัปเดตข้อมูล' 588 user_updated: 'อัปเดตข้อมูล'
589 rss_updated: 'อัปเดตข้อมูล RSS' 589 feed_updated: 'อัปเดตข้อมูล RSS'
590 tagging_rules_updated: 'อัปเดตการแท็กข้อบังคับ' 590 tagging_rules_updated: 'อัปเดตการแท็กข้อบังคับ'
591 tagging_rules_deleted: 'การลบข้อบังคับของแท็ก' 591 tagging_rules_deleted: 'การลบข้อบังคับของแท็ก'
592 rss_token_updated: 'อัปเดตเครื่องหมาย RSS ' 592 feed_token_updated: 'อัปเดตเครื่องหมาย RSS '
593 annotations_reset: รีเซ็ตหมายเหตุ 593 annotations_reset: รีเซ็ตหมายเหตุ
594 tags_reset: รีเซ็ตแท็ก 594 tags_reset: รีเซ็ตแท็ก
595 entries_reset: รีเซ็ตรายการ 595 entries_reset: รีเซ็ตรายการ
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/tags.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/tags.html.twig
index 142668c0..ae8403bd 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/tags.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/tags.html.twig
@@ -21,7 +21,7 @@
21 <i class="material-icons">mode_edit</i> 21 <i class="material-icons">mode_edit</i>
22 </a> 22 </a>
23 {% endif %} 23 {% endif %}
24 {% if app.user.config.rssToken %} 24 {% if app.user.config.feedToken %}
25 <a rel="alternate" type="application/atom+xml" href="{{ path('tag_feed', {'username': app.user.username, 'token': app.user.config.feedToken, 'slug': tag.slug}) }}" class="right"> 25 <a rel="alternate" type="application/atom+xml" href="{{ path('tag_feed', {'username': app.user.username, 'token': app.user.config.feedToken, 'slug': tag.slug}) }}" class="right">
26 <i class="material-icons md-24">rss_feed</i> 26 <i class="material-icons md-24">rss_feed</i>
27 </a> 27 </a>
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig
index 737ef5fe..79907bbb 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig
@@ -25,7 +25,7 @@
25 <i class="material-icons">mode_edit</i> 25 <i class="material-icons">mode_edit</i>
26 </a> 26 </a>
27 {% endif %} 27 {% endif %}
28 {% if app.user.config.rssToken %} 28 {% if app.user.config.feedToken %}
29 <a rel="alternate" type="application/atom+xml" href="{{ path('tag_feed', {'username': app.user.username, 'token': app.user.config.feedToken, 'slug': tag.slug}) }}" class="card-tag-rss"><i class="material-icons">rss_feed</i></a> 29 <a rel="alternate" type="application/atom+xml" href="{{ path('tag_feed', {'username': app.user.username, 'token': app.user.config.feedToken, 'slug': tag.slug}) }}" class="card-tag-rss"><i class="material-icons">rss_feed</i></a>
30 {% endif %} 30 {% endif %}
31 </li> 31 </li>
diff --git a/src/Wallabag/CoreBundle/Twig/WallabagExtension.php b/src/Wallabag/CoreBundle/Twig/WallabagExtension.php
index 61107ce7..536185d4 100644
--- a/src/Wallabag/CoreBundle/Twig/WallabagExtension.php
+++ b/src/Wallabag/CoreBundle/Twig/WallabagExtension.php
@@ -54,7 +54,7 @@ class WallabagExtension extends \Twig_Extension implements \Twig_Extension_Globa
54 54
55 public function removeSchemeAndWww($url) 55 public function removeSchemeAndWww($url)
56 { 56 {
57 return $this->removeWww($this->removeScheme($url) 57 return $this->removeWww($this->removeScheme($url));
58 } 58 }
59 59
60 /** 60 /**
diff --git a/src/Wallabag/UserBundle/Repository/UserRepository.php b/src/Wallabag/UserBundle/Repository/UserRepository.php
index 80391109..4abd55f1 100644
--- a/src/Wallabag/UserBundle/Repository/UserRepository.php
+++ b/src/Wallabag/UserBundle/Repository/UserRepository.php
@@ -14,7 +14,7 @@ class UserRepository extends EntityRepository
14 * @param string $username 14 * @param string $username
15 * @param string $feedToken 15 * @param string $feedToken
16 * 16 *
17 * @return null|User 17 * @return User|null
18 */ 18 */
19 public function findOneByUsernameAndFeedtoken($username, $feedToken) 19 public function findOneByUsernameAndFeedtoken($username, $feedToken)
20 { 20 {
diff --git a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
index 28291b5a..caa8929d 100644
--- a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
+++ b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
@@ -166,7 +166,7 @@ class EntryControllerTest extends WallabagCoreTestCase
166 $this->assertSame($this->url, $content->getUrl()); 166 $this->assertSame($this->url, $content->getUrl());
167 $this->assertContains('Google', $content->getTitle()); 167 $this->assertContains('Google', $content->getTitle());
168 $this->assertSame('fr', $content->getLanguage()); 168 $this->assertSame('fr', $content->getLanguage());
169 $this->assertSame('2016-04-07 19:01:35', $content->getPublishedAt()->format('Y-m-d H:i:s')); 169 $this->assertSame('2015-03-28 11:43:19', $content->getPublishedAt()->format('Y-m-d H:i:s'));
170 $this->assertArrayHasKey('x-frame-options', $content->getHeaders()); 170 $this->assertArrayHasKey('x-frame-options', $content->getHeaders());
171 $client->getContainer()->get('craue_config')->set('store_article_headers', 0); 171 $client->getContainer()->get('craue_config')->set('store_article_headers', 0);
172 } 172 }
diff --git a/tests/Wallabag/CoreBundle/Controller/FeedControllerTest.php b/tests/Wallabag/CoreBundle/Controller/FeedControllerTest.php
index 7442e8a4..70f33ebe 100644
--- a/tests/Wallabag/CoreBundle/Controller/FeedControllerTest.php
+++ b/tests/Wallabag/CoreBundle/Controller/FeedControllerTest.php
@@ -11,48 +11,48 @@ class FeedControllerTest extends WallabagCoreTestCase
11 $doc = new \DOMDocument(); 11 $doc = new \DOMDocument();
12 $doc->loadXML($xml); 12 $doc->loadXML($xml);
13 13
14 $xpath = new \DOMXpath($doc); 14 $xpath = new \DOMXPath($doc);
15 $xpath->registerNamespace('a', 'http://www.w3.org/2005/Atom'); 15 $xpath->registerNamespace('a', 'http://www.w3.org/2005/Atom');
16 16
17 if (null === $nb) { 17 if (null === $nb) {
18 $this->assertGreaterThan(0, $xpath->query('//a:entry')->length); 18 $this->assertGreaterThan(0, $xpath->query('//a:entry')->length);
19 } else { 19 } else {
20 $this->assertEquals($nb, $xpath->query('//a:entry')->length); 20 $this->assertSame($nb, $xpath->query('//a:entry')->length);
21 } 21 }
22 22
23 $this->assertEquals(1, $xpath->query('/a:feed')->length); 23 $this->assertSame(1, $xpath->query('/a:feed')->length);
24 24
25 $this->assertEquals(1, $xpath->query('/a:feed/a:title')->length); 25 $this->assertSame(1, $xpath->query('/a:feed/a:title')->length);
26 $this->assertContains('favicon.ico', $xpath->query('/a:feed/a:icon')->item(0)->nodeValue); 26 $this->assertContains('favicon.ico', $xpath->query('/a:feed/a:icon')->item(0)->nodeValue);
27 $this->assertContains('logo-square.png', $xpath->query('/a:feed/a:logo')->item(0)->nodeValue); 27 $this->assertContains('logo-square.png', $xpath->query('/a:feed/a:logo')->item(0)->nodeValue);
28 28
29 $this->assertEquals(1, $xpath->query('/a:feed/a:updated')->length); 29 $this->assertSame(1, $xpath->query('/a:feed/a:updated')->length);
30 30
31 $this->assertEquals(1, $xpath->query('/a:feed/a:generator')->length); 31 $this->assertSame(1, $xpath->query('/a:feed/a:generator')->length);
32 $this->assertEquals('wallabag', $xpath->query('/a:feed/a:generator')->item(0)->nodeValue); 32 $this->assertSame('wallabag', $xpath->query('/a:feed/a:generator')->item(0)->nodeValue);
33 $this->assertEquals('admin', $xpath->query('/a:feed/a:author/a:name')->item(0)->nodeValue); 33 $this->assertSame('admin', $xpath->query('/a:feed/a:author/a:name')->item(0)->nodeValue);
34 34
35 $this->assertEquals(1, $xpath->query('/a:feed/a:subtitle')->length); 35 $this->assertSame(1, $xpath->query('/a:feed/a:subtitle')->length);
36 if (null !== $tagValue && 0 === strpos($type, 'tag')) { 36 if (null !== $tagValue && 0 === strpos($type, 'tag')) {
37 $this->assertEquals('wallabag — '.$type.' '.$tagValue.' feed', $xpath->query('/a:feed/a:title')->item(0)->nodeValue); 37 $this->assertSame('wallabag — ' . $type . ' ' . $tagValue . ' feed', $xpath->query('/a:feed/a:title')->item(0)->nodeValue);
38 $this->assertEquals('Atom feed for entries tagged with ' . $tagValue, $xpath->query('/a:feed/a:subtitle')->item(0)->nodeValue); 38 $this->assertSame('Atom feed for entries tagged with ' . $tagValue, $xpath->query('/a:feed/a:subtitle')->item(0)->nodeValue);
39 } else { 39 } else {
40 $this->assertEquals('wallabag — '.$type.' feed', $xpath->query('/a:feed/a:title')->item(0)->nodeValue); 40 $this->assertSame('wallabag — ' . $type . ' feed', $xpath->query('/a:feed/a:title')->item(0)->nodeValue);
41 $this->assertEquals('Atom feed for ' . $type . ' entries', $xpath->query('/a:feed/a:subtitle')->item(0)->nodeValue); 41 $this->assertSame('Atom feed for ' . $type . ' entries', $xpath->query('/a:feed/a:subtitle')->item(0)->nodeValue);
42 } 42 }
43 43
44 $this->assertEquals(1, $xpath->query('/a:feed/a:link[@rel="self"]')->length); 44 $this->assertSame(1, $xpath->query('/a:feed/a:link[@rel="self"]')->length);
45 $this->assertContains($type, $xpath->query('/a:feed/a:link[@rel="self"]')->item(0)->getAttribute('href')); 45 $this->assertContains($type, $xpath->query('/a:feed/a:link[@rel="self"]')->item(0)->getAttribute('href'));
46 46
47 $this->assertEquals(1, $xpath->query('/a:feed/a:link[@rel="last"]')->length); 47 $this->assertSame(1, $xpath->query('/a:feed/a:link[@rel="last"]')->length);
48 48
49 foreach ($xpath->query('//a:entry') as $item) { 49 foreach ($xpath->query('//a:entry') as $item) {
50 $this->assertEquals(1, $xpath->query('a:title', $item)->length); 50 $this->assertSame(1, $xpath->query('a:title', $item)->length);
51 $this->assertEquals(1, $xpath->query('a:link[@rel="via"]', $item)->length); 51 $this->assertSame(1, $xpath->query('a:link[@rel="via"]', $item)->length);
52 $this->assertEquals(1, $xpath->query('a:link[@rel="alternate"]', $item)->length); 52 $this->assertSame(1, $xpath->query('a:link[@rel="alternate"]', $item)->length);
53 $this->assertEquals(1, $xpath->query('a:id', $item)->length); 53 $this->assertSame(1, $xpath->query('a:id', $item)->length);
54 $this->assertEquals(1, $xpath->query('a:published', $item)->length); 54 $this->assertSame(1, $xpath->query('a:published', $item)->length);
55 $this->assertEquals(1, $xpath->query('a:content', $item)->length); 55 $this->assertSame(1, $xpath->query('a:content', $item)->length);
56 } 56 }
57 } 57 }
58 58
@@ -190,15 +190,15 @@ class FeedControllerTest extends WallabagCoreTestCase
190 $client = $this->getClient(); 190 $client = $this->getClient();
191 191
192 $client->request('GET', '/feed/admin/SUPERTOKEN/unread'); 192 $client->request('GET', '/feed/admin/SUPERTOKEN/unread');
193 $this->assertEquals(200, $client->getResponse()->getStatusCode()); 193 $this->assertSame(200, $client->getResponse()->getStatusCode());
194 $this->validateDom($client->getResponse()->getContent(), 'unread'); 194 $this->validateDom($client->getResponse()->getContent(), 'unread');
195 195
196 $client->request('GET', '/feed/admin/SUPERTOKEN/unread/2'); 196 $client->request('GET', '/feed/admin/SUPERTOKEN/unread/2');
197 $this->assertEquals(200, $client->getResponse()->getStatusCode()); 197 $this->assertSame(200, $client->getResponse()->getStatusCode());
198 $this->validateDom($client->getResponse()->getContent(), 'unread'); 198 $this->validateDom($client->getResponse()->getContent(), 'unread');
199 199
200 $client->request('GET', '/feed/admin/SUPERTOKEN/unread/3000'); 200 $client->request('GET', '/feed/admin/SUPERTOKEN/unread/3000');
201 $this->assertEquals(302, $client->getResponse()->getStatusCode()); 201 $this->assertSame(302, $client->getResponse()->getStatusCode());
202 } 202 }
203 203
204 public function testTags() 204 public function testTags()
@@ -216,13 +216,13 @@ class FeedControllerTest extends WallabagCoreTestCase
216 $em->flush(); 216 $em->flush();
217 217
218 $client = $this->getClient(); 218 $client = $this->getClient();
219 $client->request('GET', '/admin/SUPERTOKEN/tags/foo-bar.xml'); 219 $client->request('GET', '/feed/admin/SUPERTOKEN/tags/foo');
220 220
221 $this->assertSame(200, $client->getResponse()->getStatusCode()); 221 $this->assertSame(200, $client->getResponse()->getStatusCode());
222 222
223 $this->validateDom($client->getResponse()->getContent(), 'tag', 2, 'foo-bar'); 223 $this->validateDom($client->getResponse()->getContent(), 'tag', 2, 'foo');
224 224
225 $client->request('GET', '/admin/SUPERTOKEN/tags/foo-bar.xml?page=3000'); 225 $client->request('GET', '/feed/admin/SUPERTOKEN/tags/foo/3000');
226 $this->assertSame(302, $client->getResponse()->getStatusCode()); 226 $this->assertSame(302, $client->getResponse()->getStatusCode());
227 } 227 }
228} 228}
diff --git a/tests/Wallabag/CoreBundle/Controller/SecurityControllerTest.php b/tests/Wallabag/CoreBundle/Controller/SecurityControllerTest.php
index 3c3354d7..93019b1f 100644
--- a/tests/Wallabag/CoreBundle/Controller/SecurityControllerTest.php
+++ b/tests/Wallabag/CoreBundle/Controller/SecurityControllerTest.php
@@ -13,7 +13,7 @@ class SecurityControllerTest extends WallabagCoreTestCase
13 $client->followRedirects(); 13 $client->followRedirects();
14 14
15 $crawler = $client->request('GET', '/config'); 15 $crawler = $client->request('GET', '/config');
16 $this->assertContains('config.form_rss.description', $crawler->filter('body')->extract(['_text'])[0]); 16 $this->assertContains('config.form_feed.description', $crawler->filter('body')->extract(['_text'])[0]);
17 } 17 }
18 18
19 public function testLoginWithout2Factor() 19 public function testLoginWithout2Factor()
diff --git a/tests/Wallabag/CoreBundle/Twig/WallabagExtensionTest.php b/tests/Wallabag/CoreBundle/Twig/WallabagExtensionTest.php
index 3fd90fda..39fcec16 100644
--- a/tests/Wallabag/CoreBundle/Twig/WallabagExtensionTest.php
+++ b/tests/Wallabag/CoreBundle/Twig/WallabagExtensionTest.php
@@ -52,9 +52,9 @@ class WallabagExtensionTest extends TestCase
52 52
53 $extension = new WallabagExtension($entryRepository, $tagRepository, $tokenStorage, 0, $translator); 53 $extension = new WallabagExtension($entryRepository, $tagRepository, $tokenStorage, 0, $translator);
54 54
55 $this->assertEquals('lemonde.fr', $extension->removeScheme('lemonde.fr')); 55 $this->assertSame('lemonde.fr', $extension->removeScheme('lemonde.fr'));
56 $this->assertEquals('gist.github.com', $extension->removeScheme('gist.github.com')); 56 $this->assertSame('gist.github.com', $extension->removeScheme('gist.github.com'));
57 $this->assertEquals('gist.github.com', $extension->removeScheme('https://gist.github.com')); 57 $this->assertSame('gist.github.com', $extension->removeScheme('https://gist.github.com'));
58 } 58 }
59 59
60 public function testRemoveSchemeAndWww() 60 public function testRemoveSchemeAndWww()