diff options
23 files changed, 184 insertions, 14 deletions
diff --git a/app/DoctrineMigrations/Version20190511165128.php b/app/DoctrineMigrations/Version20190511165128.php new file mode 100644 index 00000000..7b6b1bec --- /dev/null +++ b/app/DoctrineMigrations/Version20190511165128.php | |||
@@ -0,0 +1,30 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Application\Migrations; | ||
6 | |||
7 | use Doctrine\DBAL\Schema\Schema; | ||
8 | use Wallabag\CoreBundle\Doctrine\WallabagMigration; | ||
9 | |||
10 | /** | ||
11 | * Convert tab label to utf8mb4_bin (MySQL only). | ||
12 | */ | ||
13 | final class Version20190511165128 extends WallabagMigration | ||
14 | { | ||
15 | public function up(Schema $schema): void | ||
16 | { | ||
17 | $this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL'); | ||
18 | |||
19 | $this->addSql('ALTER TABLE ' . $this->getTable('tag') . ' CHANGE `label` `label` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;'); | ||
20 | $this->addSql('ALTER TABLE ' . $this->getTable('tag') . ' CHANGE `slug` `slug` VARCHAR(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;'); | ||
21 | } | ||
22 | |||
23 | public function down(Schema $schema): void | ||
24 | { | ||
25 | $this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL'); | ||
26 | |||
27 | $this->addSql('ALTER TABLE ' . $this->getTable('tag') . ' CHANGE `slug` `slug` VARCHAR(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); | ||
28 | $this->addSql('ALTER TABLE ' . $this->getTable('tag') . ' CHANGE `label` `label` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); | ||
29 | } | ||
30 | } | ||
diff --git a/src/Wallabag/CoreBundle/Controller/ConfigController.php b/src/Wallabag/CoreBundle/Controller/ConfigController.php index 3b281d48..cea41303 100644 --- a/src/Wallabag/CoreBundle/Controller/ConfigController.php +++ b/src/Wallabag/CoreBundle/Controller/ConfigController.php | |||
@@ -300,6 +300,34 @@ class ConfigController extends Controller | |||
300 | } | 300 | } |
301 | 301 | ||
302 | /** | 302 | /** |
303 | * @param Request $request | ||
304 | * | ||
305 | * @Route("/revoke-token", name="revoke_token") | ||
306 | * | ||
307 | * @return RedirectResponse|JsonResponse | ||
308 | */ | ||
309 | public function revokeTokenAction(Request $request) | ||
310 | { | ||
311 | $config = $this->getConfig(); | ||
312 | $config->setFeedToken(null); | ||
313 | |||
314 | $em = $this->getDoctrine()->getManager(); | ||
315 | $em->persist($config); | ||
316 | $em->flush(); | ||
317 | |||
318 | if ($request->isXmlHttpRequest()) { | ||
319 | return new JsonResponse(); | ||
320 | } | ||
321 | |||
322 | $this->addFlash( | ||
323 | 'notice', | ||
324 | 'flashes.config.notice.feed_token_revoked' | ||
325 | ); | ||
326 | |||
327 | return $this->redirect($this->generateUrl('config') . '#set2'); | ||
328 | } | ||
329 | |||
330 | /** | ||
303 | * Deletes a tagging rule and redirect to the config homepage. | 331 | * Deletes a tagging rule and redirect to the config homepage. |
304 | * | 332 | * |
305 | * @param TaggingRule $rule | 333 | * @param TaggingRule $rule |
diff --git a/src/Wallabag/CoreBundle/Entity/Tag.php b/src/Wallabag/CoreBundle/Entity/Tag.php index a6dc8c50..95c47bbd 100644 --- a/src/Wallabag/CoreBundle/Entity/Tag.php +++ b/src/Wallabag/CoreBundle/Entity/Tag.php | |||
@@ -13,7 +13,10 @@ use JMS\Serializer\Annotation\XmlRoot; | |||
13 | * Tag. | 13 | * Tag. |
14 | * | 14 | * |
15 | * @XmlRoot("tag") | 15 | * @XmlRoot("tag") |
16 | * @ORM\Table(name="`tag`") | 16 | * @ORM\Table( |
17 | * name="`tag`", | ||
18 | * options={"collate"="utf8mb4_bin", "charset"="utf8mb4"}, | ||
19 | * ) | ||
17 | * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\TagRepository") | 20 | * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\TagRepository") |
18 | * @ExclusionPolicy("all") | 21 | * @ExclusionPolicy("all") |
19 | */ | 22 | */ |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml index a01c7688..b6e067cc 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml | |||
@@ -33,6 +33,7 @@ menu: | |||
33 | back_to_unread: 'Tilbage til de ulæste artikler' | 33 | back_to_unread: 'Tilbage til de ulæste artikler' |
34 | # users_management: 'Users management' | 34 | # users_management: 'Users management' |
35 | # site_credentials: 'Site credentials' | 35 | # site_credentials: 'Site credentials' |
36 | # quickstart: "Quickstart" | ||
36 | top: | 37 | top: |
37 | add_new_entry: 'Tilføj ny artikel' | 38 | add_new_entry: 'Tilføj ny artikel' |
38 | search: 'Søg' | 39 | search: 'Søg' |
@@ -91,6 +92,7 @@ config: | |||
91 | no_token: 'Intet token' | 92 | no_token: 'Intet token' |
92 | token_create: 'Opret token' | 93 | token_create: 'Opret token' |
93 | token_reset: 'Nulstil token' | 94 | token_reset: 'Nulstil token' |
95 | # token_revoke: 'Revoke the token' | ||
94 | feed_links: 'RSS-Links' | 96 | feed_links: 'RSS-Links' |
95 | feed_link: | 97 | feed_link: |
96 | unread: 'Ulæst' | 98 | unread: 'Ulæst' |
@@ -594,6 +596,7 @@ flashes: | |||
594 | # tagging_rules_updated: 'Tagging rules updated' | 596 | # tagging_rules_updated: 'Tagging rules updated' |
595 | # tagging_rules_deleted: 'Tagging rule deleted' | 597 | # tagging_rules_deleted: 'Tagging rule deleted' |
596 | # feed_token_updated: 'RSS token updated' | 598 | # feed_token_updated: 'RSS token updated' |
599 | # feed_token_revoked: 'RSS token revoked' | ||
597 | # annotations_reset: Annotations reset | 600 | # annotations_reset: Annotations reset |
598 | # tags_reset: Tags reset | 601 | # tags_reset: Tags reset |
599 | # entries_reset: Entries reset | 602 | # entries_reset: Entries reset |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml index a1b41855..072cac0a 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml | |||
@@ -33,6 +33,7 @@ menu: | |||
33 | back_to_unread: 'Zurück zu ungelesenen Artikeln' | 33 | back_to_unread: 'Zurück zu ungelesenen Artikeln' |
34 | users_management: 'Benutzerverwaltung' | 34 | users_management: 'Benutzerverwaltung' |
35 | site_credentials: 'Zugangsdaten' | 35 | site_credentials: 'Zugangsdaten' |
36 | quickstart: "Schnelleinstieg" | ||
36 | top: | 37 | top: |
37 | add_new_entry: 'Neuen Artikel hinzufügen' | 38 | add_new_entry: 'Neuen Artikel hinzufügen' |
38 | search: 'Suche' | 39 | search: 'Suche' |
@@ -91,6 +92,7 @@ config: | |||
91 | no_token: 'Kein Token' | 92 | no_token: 'Kein Token' |
92 | token_create: 'Token erstellen' | 93 | token_create: 'Token erstellen' |
93 | token_reset: 'Token zurücksetzen' | 94 | token_reset: 'Token zurücksetzen' |
95 | # token_revoke: 'Revoke the token' | ||
94 | feed_links: 'RSS-Links' | 96 | feed_links: 'RSS-Links' |
95 | feed_link: | 97 | feed_link: |
96 | unread: 'Ungelesene' | 98 | unread: 'Ungelesene' |
@@ -585,6 +587,7 @@ flashes: | |||
585 | tagging_rules_updated: 'Tagging-Regeln aktualisiert' | 587 | tagging_rules_updated: 'Tagging-Regeln aktualisiert' |
586 | tagging_rules_deleted: 'Tagging-Regel gelöscht' | 588 | tagging_rules_deleted: 'Tagging-Regel gelöscht' |
587 | feed_token_updated: 'RSS-Token aktualisiert' | 589 | feed_token_updated: 'RSS-Token aktualisiert' |
590 | # feed_token_revoked: 'RSS token revoked' | ||
588 | annotations_reset: Anmerkungen zurücksetzen | 591 | annotations_reset: Anmerkungen zurücksetzen |
589 | tags_reset: Tags zurücksetzen | 592 | tags_reset: Tags zurücksetzen |
590 | entries_reset: Einträge zurücksetzen | 593 | entries_reset: Einträge zurücksetzen |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml index 020cd08a..e1631d10 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml | |||
@@ -33,6 +33,7 @@ menu: | |||
33 | back_to_unread: 'Back to unread articles' | 33 | back_to_unread: 'Back to unread articles' |
34 | users_management: 'Users management' | 34 | users_management: 'Users management' |
35 | site_credentials: 'Site credentials' | 35 | site_credentials: 'Site credentials' |
36 | quickstart: "Quickstart" | ||
36 | top: | 37 | top: |
37 | add_new_entry: 'Add a new entry' | 38 | add_new_entry: 'Add a new entry' |
38 | search: 'Search' | 39 | search: 'Search' |
@@ -91,6 +92,7 @@ config: | |||
91 | no_token: 'No token' | 92 | no_token: 'No token' |
92 | token_create: 'Create your token' | 93 | token_create: 'Create your token' |
93 | token_reset: 'Regenerate your token' | 94 | token_reset: 'Regenerate your token' |
95 | token_revoke: 'Revoke the token' | ||
94 | feed_links: 'Feed links' | 96 | feed_links: 'Feed links' |
95 | feed_link: | 97 | feed_link: |
96 | unread: 'Unread' | 98 | unread: 'Unread' |
@@ -594,6 +596,7 @@ flashes: | |||
594 | tagging_rules_updated: 'Tagging rules updated' | 596 | tagging_rules_updated: 'Tagging rules updated' |
595 | tagging_rules_deleted: 'Tagging rule deleted' | 597 | tagging_rules_deleted: 'Tagging rule deleted' |
596 | feed_token_updated: 'Feed token updated' | 598 | feed_token_updated: 'Feed token updated' |
599 | feed_token_revoked: 'RSS token revoked' | ||
597 | annotations_reset: Annotations reset | 600 | annotations_reset: Annotations reset |
598 | tags_reset: Tags reset | 601 | tags_reset: Tags reset |
599 | entries_reset: Entries reset | 602 | entries_reset: Entries reset |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml index 130c12f3..ebd4477a 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml | |||
@@ -33,6 +33,7 @@ menu: | |||
33 | back_to_unread: 'Volver a los artículos sin leer' | 33 | back_to_unread: 'Volver a los artículos sin leer' |
34 | users_management: 'Configuración de usuarios' | 34 | users_management: 'Configuración de usuarios' |
35 | # site_credentials: 'Site credentials' | 35 | # site_credentials: 'Site credentials' |
36 | quickstart: "Inicio rápido" | ||
36 | top: | 37 | top: |
37 | add_new_entry: 'Añadir un nuevo artículo' | 38 | add_new_entry: 'Añadir un nuevo artículo' |
38 | search: 'Buscar' | 39 | search: 'Buscar' |
@@ -91,6 +92,7 @@ config: | |||
91 | no_token: 'Sin token' | 92 | no_token: 'Sin token' |
92 | token_create: 'Crear token' | 93 | token_create: 'Crear token' |
93 | token_reset: 'Reiniciar token' | 94 | token_reset: 'Reiniciar token' |
95 | # token_revoke: 'Revoke the token' | ||
94 | feed_links: 'URLs de feeds RSS' | 96 | feed_links: 'URLs de feeds RSS' |
95 | feed_link: | 97 | feed_link: |
96 | unread: 'sin leer' | 98 | unread: 'sin leer' |
@@ -594,6 +596,7 @@ flashes: | |||
594 | tagging_rules_updated: 'Regla de etiquetado actualizada' | 596 | tagging_rules_updated: 'Regla de etiquetado actualizada' |
595 | tagging_rules_deleted: 'Regla de etiquetado eliminada' | 597 | tagging_rules_deleted: 'Regla de etiquetado eliminada' |
596 | feed_token_updated: 'Token RSS actualizado' | 598 | feed_token_updated: 'Token RSS actualizado' |
599 | # feed_token_revoked: 'RSS token revoked' | ||
597 | annotations_reset: Anotaciones reiniciadas | 600 | annotations_reset: Anotaciones reiniciadas |
598 | tags_reset: Etiquetas reiniciadas | 601 | tags_reset: Etiquetas reiniciadas |
599 | entries_reset: Artículos reiniciados | 602 | entries_reset: Artículos reiniciados |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml index 31db51fa..e3857e24 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml | |||
@@ -33,6 +33,7 @@ menu: | |||
33 | back_to_unread: 'بازگشت به خواندهنشدهها' | 33 | back_to_unread: 'بازگشت به خواندهنشدهها' |
34 | # users_management: 'Users management' | 34 | # users_management: 'Users management' |
35 | # site_credentials: 'Site credentials' | 35 | # site_credentials: 'Site credentials' |
36 | quickstart: "Quickstart" | ||
36 | top: | 37 | top: |
37 | add_new_entry: 'افزودن مقالهٔ تازه' | 38 | add_new_entry: 'افزودن مقالهٔ تازه' |
38 | search: 'جستجو' | 39 | search: 'جستجو' |
@@ -91,6 +92,7 @@ config: | |||
91 | no_token: 'بدون کد' | 92 | no_token: 'بدون کد' |
92 | token_create: 'کد خود را بسازید' | 93 | token_create: 'کد خود را بسازید' |
93 | token_reset: 'بازنشانی کد' | 94 | token_reset: 'بازنشانی کد' |
95 | # token_revoke: 'Revoke the token' | ||
94 | feed_links: 'پیوند آر-اس-اس' | 96 | feed_links: 'پیوند آر-اس-اس' |
95 | feed_link: | 97 | feed_link: |
96 | unread: 'خواندهنشده' | 98 | unread: 'خواندهنشده' |
@@ -594,6 +596,7 @@ flashes: | |||
594 | tagging_rules_updated: 'برچسبگذاری خودکار بهروز شد' | 596 | tagging_rules_updated: 'برچسبگذاری خودکار بهروز شد' |
595 | tagging_rules_deleted: 'قانون برچسبگذاری پاک شد' | 597 | tagging_rules_deleted: 'قانون برچسبگذاری پاک شد' |
596 | feed_token_updated: 'کد آر-اس-اس بهروز شد' | 598 | feed_token_updated: 'کد آر-اس-اس بهروز شد' |
599 | # feed_token_revoked: 'RSS token revoked' | ||
597 | # annotations_reset: Annotations reset | 600 | # annotations_reset: Annotations reset |
598 | # tags_reset: Tags reset | 601 | # tags_reset: Tags reset |
599 | # entries_reset: Entries reset | 602 | # entries_reset: Entries reset |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml index df3692dc..97cb3272 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml | |||
@@ -33,6 +33,7 @@ menu: | |||
33 | back_to_unread: "Retour aux articles non lus" | 33 | back_to_unread: "Retour aux articles non lus" |
34 | users_management: "Gestion des utilisateurs" | 34 | users_management: "Gestion des utilisateurs" |
35 | site_credentials: 'Accès aux sites' | 35 | site_credentials: 'Accès aux sites' |
36 | quickstart: "Pour bien débuter" | ||
36 | top: | 37 | top: |
37 | add_new_entry: "Sauvegarder un nouvel article" | 38 | add_new_entry: "Sauvegarder un nouvel article" |
38 | search: "Rechercher" | 39 | search: "Rechercher" |
@@ -91,6 +92,7 @@ config: | |||
91 | no_token: "Aucun jeton généré" | 92 | no_token: "Aucun jeton généré" |
92 | token_create: "Créez votre jeton" | 93 | token_create: "Créez votre jeton" |
93 | token_reset: "Réinitialisez votre jeton" | 94 | token_reset: "Réinitialisez votre jeton" |
95 | token_revoke: 'Supprimer le jeton' | ||
94 | feed_links: "Adresses de vos flux" | 96 | feed_links: "Adresses de vos flux" |
95 | feed_link: | 97 | feed_link: |
96 | unread: "Non lus" | 98 | unread: "Non lus" |
@@ -595,6 +597,7 @@ flashes: | |||
595 | tagging_rules_updated: "Règles mises à jour" | 597 | tagging_rules_updated: "Règles mises à jour" |
596 | tagging_rules_deleted: "Règle supprimée" | 598 | tagging_rules_deleted: "Règle supprimée" |
597 | feed_token_updated: "Jeton des flux mis à jour" | 599 | feed_token_updated: "Jeton des flux mis à jour" |
600 | feed_token_revoked: 'Jeton des flux supprimé' | ||
598 | annotations_reset: "Annotations supprimées" | 601 | annotations_reset: "Annotations supprimées" |
599 | tags_reset: "Tags supprimés" | 602 | tags_reset: "Tags supprimés" |
600 | entries_reset: "Articles supprimés" | 603 | entries_reset: "Articles supprimés" |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml index 337a1bfa..7c0110a4 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml | |||
@@ -33,6 +33,7 @@ menu: | |||
33 | back_to_unread: 'Torna ai contenuti non letti' | 33 | back_to_unread: 'Torna ai contenuti non letti' |
34 | users_management: 'Gestione utenti' | 34 | users_management: 'Gestione utenti' |
35 | site_credentials: 'Credenziali sito' | 35 | site_credentials: 'Credenziali sito' |
36 | quickstart: "Introduzione" | ||
36 | top: | 37 | top: |
37 | add_new_entry: 'Aggiungi un nuovo contenuto' | 38 | add_new_entry: 'Aggiungi un nuovo contenuto' |
38 | search: 'Cerca' | 39 | search: 'Cerca' |
@@ -91,6 +92,7 @@ config: | |||
91 | no_token: 'Nessun token' | 92 | no_token: 'Nessun token' |
92 | token_create: 'Crea il tuo token' | 93 | token_create: 'Crea il tuo token' |
93 | token_reset: 'Rigenera il tuo token' | 94 | token_reset: 'Rigenera il tuo token' |
95 | # token_revoke: 'Revoke the token' | ||
94 | feed_links: 'Collegamenti RSS' | 96 | feed_links: 'Collegamenti RSS' |
95 | feed_link: | 97 | feed_link: |
96 | unread: 'Non letti' | 98 | unread: 'Non letti' |
@@ -593,6 +595,7 @@ flashes: | |||
593 | tagging_rules_updated: 'Regole di etichettatura aggiornate' | 595 | tagging_rules_updated: 'Regole di etichettatura aggiornate' |
594 | tagging_rules_deleted: 'Regola di etichettatura eliminate' | 596 | tagging_rules_deleted: 'Regola di etichettatura eliminate' |
595 | feed_token_updated: 'RSS token aggiornato' | 597 | feed_token_updated: 'RSS token aggiornato' |
598 | # feed_token_revoked: 'RSS token revoked' | ||
596 | annotations_reset: Reset annotazioni | 599 | annotations_reset: Reset annotazioni |
597 | tags_reset: Reset etichette | 600 | tags_reset: Reset etichette |
598 | entries_reset: Reset articoli | 601 | entries_reset: Reset articoli |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml index fc0a03b5..e74d1a20 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml | |||
@@ -33,6 +33,7 @@ menu: | |||
33 | back_to_unread: 'Tornar als articles pas legits' | 33 | back_to_unread: 'Tornar als articles pas legits' |
34 | users_management: 'Gestion dels utilizaires' | 34 | users_management: 'Gestion dels utilizaires' |
35 | site_credentials: 'Identificants del site' | 35 | site_credentials: 'Identificants del site' |
36 | quickstart: "Per ben començar" | ||
36 | top: | 37 | top: |
37 | add_new_entry: 'Enregistrar un novèl article' | 38 | add_new_entry: 'Enregistrar un novèl article' |
38 | search: 'Cercar' | 39 | search: 'Cercar' |
@@ -91,6 +92,7 @@ config: | |||
91 | no_token: 'Pas cap de geton generat' | 92 | no_token: 'Pas cap de geton generat' |
92 | token_create: 'Creatz vòstre geton' | 93 | token_create: 'Creatz vòstre geton' |
93 | token_reset: 'Reïnicializatz vòstre geton' | 94 | token_reset: 'Reïnicializatz vòstre geton' |
95 | # token_revoke: 'Revoke the token' | ||
94 | feed_links: 'URLs de vòstres fluxes RSS' | 96 | feed_links: 'URLs de vòstres fluxes RSS' |
95 | feed_link: | 97 | feed_link: |
96 | unread: 'Pas legits' | 98 | unread: 'Pas legits' |
@@ -593,6 +595,7 @@ flashes: | |||
593 | tagging_rules_updated: 'Règlas misa a jorn' | 595 | tagging_rules_updated: 'Règlas misa a jorn' |
594 | tagging_rules_deleted: 'Règla suprimida' | 596 | tagging_rules_deleted: 'Règla suprimida' |
595 | feed_token_updated: 'Geton RSS mes a jorn' | 597 | feed_token_updated: 'Geton RSS mes a jorn' |
598 | # feed_token_revoked: 'RSS token revoked' | ||
596 | annotations_reset: Anotacions levadas | 599 | annotations_reset: Anotacions levadas |
597 | tags_reset: Etiquetas levadas | 600 | tags_reset: Etiquetas levadas |
598 | entries_reset: Articles levats | 601 | entries_reset: Articles levats |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml index f9609ea2..f4da2b18 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml | |||
@@ -33,6 +33,7 @@ menu: | |||
33 | back_to_unread: 'Powrót do nieprzeczytanych artykułów' | 33 | back_to_unread: 'Powrót do nieprzeczytanych artykułów' |
34 | users_management: 'Zarządzanie użytkownikami' | 34 | users_management: 'Zarządzanie użytkownikami' |
35 | site_credentials: 'Poświadczenia strony' | 35 | site_credentials: 'Poświadczenia strony' |
36 | quickstart: "Szybki start" | ||
36 | top: | 37 | top: |
37 | add_new_entry: 'Dodaj nowy wpis' | 38 | add_new_entry: 'Dodaj nowy wpis' |
38 | search: 'Szukaj' | 39 | search: 'Szukaj' |
@@ -91,6 +92,7 @@ config: | |||
91 | no_token: 'Brak tokena' | 92 | no_token: 'Brak tokena' |
92 | token_create: 'Stwórz tokena' | 93 | token_create: 'Stwórz tokena' |
93 | token_reset: 'Zresetuj swojego tokena' | 94 | token_reset: 'Zresetuj swojego tokena' |
95 | # token_revoke: 'Revoke the token' | ||
94 | feed_links: 'RSS links' | 96 | feed_links: 'RSS links' |
95 | feed_link: | 97 | feed_link: |
96 | unread: 'Nieprzeczytane' | 98 | unread: 'Nieprzeczytane' |
@@ -593,6 +595,7 @@ flashes: | |||
593 | tagging_rules_updated: 'Reguły tagowania zaktualizowane' | 595 | tagging_rules_updated: 'Reguły tagowania zaktualizowane' |
594 | tagging_rules_deleted: 'Reguła tagowania usunięta' | 596 | tagging_rules_deleted: 'Reguła tagowania usunięta' |
595 | feed_token_updated: 'Token kanału RSS zaktualizowany' | 597 | feed_token_updated: 'Token kanału RSS zaktualizowany' |
598 | # feed_token_revoked: 'RSS token revoked' | ||
596 | annotations_reset: Zresetuj adnotacje | 599 | annotations_reset: Zresetuj adnotacje |
597 | tags_reset: Zresetuj tagi | 600 | tags_reset: Zresetuj tagi |
598 | entries_reset: Zresetuj wpisy | 601 | entries_reset: Zresetuj wpisy |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml index e9d3a6cf..76d2bebe 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml | |||
@@ -33,6 +33,7 @@ menu: | |||
33 | back_to_unread: 'Voltar para os artigos não lidos' | 33 | back_to_unread: 'Voltar para os artigos não lidos' |
34 | users_management: 'Gestão de Usuários' | 34 | users_management: 'Gestão de Usuários' |
35 | # site_credentials: 'Site credentials' | 35 | # site_credentials: 'Site credentials' |
36 | quickstart: "Começo Rápido" | ||
36 | top: | 37 | top: |
37 | add_new_entry: 'Adicionar uma nova entrada' | 38 | add_new_entry: 'Adicionar uma nova entrada' |
38 | search: 'Pesquisa' | 39 | search: 'Pesquisa' |
@@ -91,6 +92,7 @@ config: | |||
91 | no_token: 'Nenhum Token' | 92 | no_token: 'Nenhum Token' |
92 | token_create: 'Criar seu token' | 93 | token_create: 'Criar seu token' |
93 | token_reset: 'Gerar novamente seu token' | 94 | token_reset: 'Gerar novamente seu token' |
95 | # token_revoke: 'Revoke the token' | ||
94 | feed_links: 'Links RSS' | 96 | feed_links: 'Links RSS' |
95 | feed_link: | 97 | feed_link: |
96 | unread: 'Não lido' | 98 | unread: 'Não lido' |
@@ -593,6 +595,7 @@ flashes: | |||
593 | tagging_rules_updated: 'Regras de tags atualizadas' | 595 | tagging_rules_updated: 'Regras de tags atualizadas' |
594 | tagging_rules_deleted: 'Regra de tag apagada' | 596 | tagging_rules_deleted: 'Regra de tag apagada' |
595 | feed_token_updated: 'Token RSS atualizado' | 597 | feed_token_updated: 'Token RSS atualizado' |
598 | # feed_token_revoked: 'RSS token revoked' | ||
596 | # annotations_reset: Annotations reset | 599 | # annotations_reset: Annotations reset |
597 | # tags_reset: Tags reset | 600 | # tags_reset: Tags reset |
598 | # entries_reset: Entries reset | 601 | # entries_reset: Entries reset |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml index dde0c9a1..c10df5fe 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml | |||
@@ -33,6 +33,7 @@ menu: | |||
33 | back_to_unread: 'Înapoi la articolele necitite' | 33 | back_to_unread: 'Înapoi la articolele necitite' |
34 | # users_management: 'Users management' | 34 | # users_management: 'Users management' |
35 | # site_credentials: 'Site credentials' | 35 | # site_credentials: 'Site credentials' |
36 | # quickstart: "Quickstart" | ||
36 | top: | 37 | top: |
37 | add_new_entry: 'Introdu un nou articol' | 38 | add_new_entry: 'Introdu un nou articol' |
38 | search: 'Căutare' | 39 | search: 'Căutare' |
@@ -91,6 +92,7 @@ config: | |||
91 | no_token: 'Fără token' | 92 | no_token: 'Fără token' |
92 | token_create: 'Crează-ți token' | 93 | token_create: 'Crează-ți token' |
93 | token_reset: 'Resetează-ți token-ul' | 94 | token_reset: 'Resetează-ți token-ul' |
95 | # token_revoke: 'Revoke the token' | ||
94 | feed_links: 'Link-uri RSS' | 96 | feed_links: 'Link-uri RSS' |
95 | feed_link: | 97 | feed_link: |
96 | unread: 'Unread' | 98 | unread: 'Unread' |
@@ -593,6 +595,7 @@ flashes: | |||
593 | # tagging_rules_updated: 'Tagging rules updated' | 595 | # tagging_rules_updated: 'Tagging rules updated' |
594 | # tagging_rules_deleted: 'Tagging rule deleted' | 596 | # tagging_rules_deleted: 'Tagging rule deleted' |
595 | # feed_token_updated: 'RSS token updated' | 597 | # feed_token_updated: 'RSS token updated' |
598 | # feed_token_revoked: 'RSS token revoked' | ||
596 | # annotations_reset: Annotations reset | 599 | # annotations_reset: Annotations reset |
597 | # tags_reset: Tags reset | 600 | # tags_reset: Tags reset |
598 | # entries_reset: Entries reset | 601 | # entries_reset: Entries reset |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml index 8dcba74b..48695b3f 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml | |||
@@ -32,6 +32,8 @@ menu: | |||
32 | save_link: 'Сохранить ссылку' | 32 | save_link: 'Сохранить ссылку' |
33 | back_to_unread: 'Назад к непрочитанным записям' | 33 | back_to_unread: 'Назад к непрочитанным записям' |
34 | users_management: 'Управление пользователями' | 34 | users_management: 'Управление пользователями' |
35 | site_credentials: 'Site credentials' | ||
36 | quickstart: "Быстрый старт" | ||
35 | top: | 37 | top: |
36 | add_new_entry: 'Добавить новую запись' | 38 | add_new_entry: 'Добавить новую запись' |
37 | search: 'Поиск' | 39 | search: 'Поиск' |
@@ -89,6 +91,7 @@ config: | |||
89 | no_token: 'Ключ не задан' | 91 | no_token: 'Ключ не задан' |
90 | token_create: 'Создать ключ' | 92 | token_create: 'Создать ключ' |
91 | token_reset: 'Пересоздать ключ' | 93 | token_reset: 'Пересоздать ключ' |
94 | # token_revoke: 'Revoke the token' | ||
92 | feed_links: 'ссылка на RSS' | 95 | feed_links: 'ссылка на RSS' |
93 | feed_link: | 96 | feed_link: |
94 | unread: 'непрочитанные' | 97 | unread: 'непрочитанные' |
@@ -559,6 +562,7 @@ flashes: | |||
559 | tagging_rules_updated: 'Правила тегировния обновлены' | 562 | tagging_rules_updated: 'Правила тегировния обновлены' |
560 | tagging_rules_deleted: 'Правила тегировния удалены' | 563 | tagging_rules_deleted: 'Правила тегировния удалены' |
561 | feed_token_updated: 'RSS ключ обновлен' | 564 | feed_token_updated: 'RSS ключ обновлен' |
565 | # feed_token_revoked: 'RSS token revoked' | ||
562 | annotations_reset: "Аннотации сброшены" | 566 | annotations_reset: "Аннотации сброшены" |
563 | tags_reset: "Теги сброшены" | 567 | tags_reset: "Теги сброшены" |
564 | entries_reset: "Записи сброшены" | 568 | entries_reset: "Записи сброшены" |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml index 8dc65dd6..da5bbecd 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml | |||
@@ -33,6 +33,7 @@ menu: | |||
33 | back_to_unread: 'กลับไปยังรายการที่ไม่ได้อ่าน' | 33 | back_to_unread: 'กลับไปยังรายการที่ไม่ได้อ่าน' |
34 | users_management: 'การจัดการผู้ใช้' | 34 | users_management: 'การจัดการผู้ใช้' |
35 | site_credentials: 'การรับรองไซต์' | 35 | site_credentials: 'การรับรองไซต์' |
36 | quickstart: "เริ่มแบบด่วน" | ||
36 | top: | 37 | top: |
37 | add_new_entry: 'เพิ่มรายการใหม่' | 38 | add_new_entry: 'เพิ่มรายการใหม่' |
38 | search: 'ค้นหา' | 39 | search: 'ค้นหา' |
@@ -91,6 +92,7 @@ config: | |||
91 | no_token: 'ไม่มีเครื่องหมาย' | 92 | no_token: 'ไม่มีเครื่องหมาย' |
92 | token_create: 'สร้างเครื่องหมาย' | 93 | token_create: 'สร้างเครื่องหมาย' |
93 | token_reset: 'ทำเครื่องหมาย' | 94 | token_reset: 'ทำเครื่องหมาย' |
95 | # token_revoke: 'Revoke the token' | ||
94 | feed_links: 'ลิงค์ RSS' | 96 | feed_links: 'ลิงค์ RSS' |
95 | feed_link: | 97 | feed_link: |
96 | unread: 'ยังไมได้่อ่าน' | 98 | unread: 'ยังไมได้่อ่าน' |
@@ -591,6 +593,7 @@ flashes: | |||
591 | tagging_rules_updated: 'อัปเดตการแท็กข้อบังคับ' | 593 | tagging_rules_updated: 'อัปเดตการแท็กข้อบังคับ' |
592 | tagging_rules_deleted: 'การลบข้อบังคับของแท็ก' | 594 | tagging_rules_deleted: 'การลบข้อบังคับของแท็ก' |
593 | feed_token_updated: 'อัปเดตเครื่องหมาย RSS ' | 595 | feed_token_updated: 'อัปเดตเครื่องหมาย RSS ' |
596 | # feed_token_revoked: 'RSS token revoked' | ||
594 | annotations_reset: รีเซ็ตหมายเหตุ | 597 | annotations_reset: รีเซ็ตหมายเหตุ |
595 | tags_reset: รีเซ็ตแท็ก | 598 | tags_reset: รีเซ็ตแท็ก |
596 | entries_reset: รีเซ็ตรายการ | 599 | entries_reset: รีเซ็ตรายการ |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml index 49ebe79f..8f42d381 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml | |||
@@ -33,6 +33,7 @@ menu: | |||
33 | back_to_unread: 'Okunmayan makalelere geri dön' | 33 | back_to_unread: 'Okunmayan makalelere geri dön' |
34 | # users_management: 'Users management' | 34 | # users_management: 'Users management' |
35 | # site_credentials: 'Site credentials' | 35 | # site_credentials: 'Site credentials' |
36 | quickstart: "Hızlı başlangıç" | ||
36 | top: | 37 | top: |
37 | add_new_entry: 'Yeni bir makale ekle' | 38 | add_new_entry: 'Yeni bir makale ekle' |
38 | search: 'Ara' | 39 | search: 'Ara' |
@@ -91,6 +92,7 @@ config: | |||
91 | no_token: 'Belirteç (token) yok' | 92 | no_token: 'Belirteç (token) yok' |
92 | token_create: 'Yeni belirteç (token) oluştur' | 93 | token_create: 'Yeni belirteç (token) oluştur' |
93 | token_reset: 'Belirteci (token) sıfırla' | 94 | token_reset: 'Belirteci (token) sıfırla' |
95 | # token_revoke: 'Revoke the token' | ||
94 | feed_links: 'RSS akış bağlantıları' | 96 | feed_links: 'RSS akış bağlantıları' |
95 | feed_link: | 97 | feed_link: |
96 | unread: 'Okunmayan' | 98 | unread: 'Okunmayan' |
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 4ef6ab3c..a1caf242 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 | |||
@@ -111,14 +111,14 @@ | |||
111 | {% else %} | 111 | {% else %} |
112 | <em>{{ 'config.form_feed.no_token'|trans }}</em> | 112 | <em>{{ 'config.form_feed.no_token'|trans }}</em> |
113 | {% endif %} | 113 | {% endif %} |
114 | – | 114 | |
115 | <a href="{{ path('generate_token') }}"> | 115 | {% if feed.token %} |
116 | {% if feed.token %} | 116 | – <a href="{{ path('generate_token') }}">{{ 'config.form_feed.token_reset'|trans }}</a> |
117 | {{ 'config.form_feed.token_reset'|trans }} | 117 | – <a href="{{ path('revoke_token') }}">{{ 'config.form_feed.token_revoke'|trans }}</a> |
118 | {% else %} | 118 | {% else %} |
119 | {{ 'config.form_feed.token_create'|trans }} | 119 | – <a href="{{ path('generate_token') }}">{{ 'config.form_feed.token_create'|trans }}</a> |
120 | {% endif %} | 120 | {% endif %} |
121 | </a> | 121 | |
122 | </div> | 122 | </div> |
123 | </fieldset> | 123 | </fieldset> |
124 | 124 | ||
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/layout.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/layout.html.twig index 35a54daf..6b1e2bd7 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/layout.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/layout.html.twig | |||
@@ -50,6 +50,7 @@ | |||
50 | <li class="menu howto"><a href="{{ path('howto') }}">{{ 'menu.left.howto'|trans }}</a></li> | 50 | <li class="menu howto"><a href="{{ path('howto') }}">{{ 'menu.left.howto'|trans }}</a></li> |
51 | <li class="menu developer"><a href="{{ path('developer') }}">{{ 'menu.left.developer'|trans }}</a></li> | 51 | <li class="menu developer"><a href="{{ path('developer') }}">{{ 'menu.left.developer'|trans }}</a></li> |
52 | <li class="menu about"><a href="{{ path('about') }}">{{ 'footer.wallabag.about'|trans }}</a></li> | 52 | <li class="menu about"><a href="{{ path('about') }}">{{ 'footer.wallabag.about'|trans }}</a></li> |
53 | <li class="menu quickstart"><a href="{{ path('quickstart') }}">{{ 'menu.left.quickstart'|trans }}</a></li> | ||
53 | <li class="menu logout"><a class="icon icon-power" href="{{ path('fos_user_security_logout') }}">{{ 'menu.left.logout'|trans }}</a></li> | 54 | <li class="menu logout"><a class="icon icon-power" href="{{ path('fos_user_security_logout') }}">{{ 'menu.left.logout'|trans }}</a></li> |
54 | </ul> | 55 | </ul> |
55 | {% endblock %} | 56 | {% endblock %} |
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 818fc4e7..a48c9e28 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 | |||
@@ -140,12 +140,13 @@ | |||
140 | {% else %} | 140 | {% else %} |
141 | <em>{{ 'config.form_feed.no_token'|trans }}</em> | 141 | <em>{{ 'config.form_feed.no_token'|trans }}</em> |
142 | {% endif %} | 142 | {% endif %} |
143 | – <a href="{{ path('generate_token') }}"> | 143 | |
144 | {% if feed.token %} | 144 | {% if feed.token %} |
145 | {{ 'config.form_feed.token_reset'|trans }} | 145 | – <a href="{{ path('generate_token') }}">{{ 'config.form_feed.token_reset'|trans }}</a> |
146 | – <a href="{{ path('revoke_token') }}">{{ 'config.form_feed.token_revoke'|trans }}</a> | ||
146 | {% else %} | 147 | {% else %} |
147 | {{ 'config.form_feed.token_create'|trans }} | 148 | – <a href="{{ path('generate_token') }}">{{ 'config.form_feed.token_create'|trans }}</a> |
148 | {% endif %}</a> | 149 | {% endif %} |
149 | </div> | 150 | </div> |
150 | </div> | 151 | </div> |
151 | </div> | 152 | </div> |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig index b9c45567..c51d07fc 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig | |||
@@ -91,6 +91,9 @@ | |||
91 | <li class="bold {% if currentRoute == 'howto' %}active{% endif %}"> | 91 | <li class="bold {% if currentRoute == 'howto' %}active{% endif %}"> |
92 | <a class="waves-effect" href="{{ path('howto') }}">{{ 'menu.left.howto'|trans }}</a> | 92 | <a class="waves-effect" href="{{ path('howto') }}">{{ 'menu.left.howto'|trans }}</a> |
93 | </li> | 93 | </li> |
94 | <li class="bold {% if currentRoute == 'quickstart' %}active{% endif %}"> | ||
95 | <a class="waves-effect" href="{{ path('quickstart') }}">{{ 'menu.left.quickstart'|trans }}</a> | ||
96 | </li> | ||
94 | <li class="bold"> | 97 | <li class="bold"> |
95 | <a class="waves-effect icon icon-power" href="{{ path('fos_user_security_logout') }}">{{ 'menu.left.logout'|trans }}</a> | 98 | <a class="waves-effect icon icon-power" href="{{ path('fos_user_security_logout') }}">{{ 'menu.left.logout'|trans }}</a> |
96 | </li> | 99 | </li> |
diff --git a/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php b/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php index d8478ce3..b9e0bed2 100644 --- a/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php | |||
@@ -330,7 +330,7 @@ class ConfigControllerTest extends WallabagCoreTestCase | |||
330 | $crawler = $client->followRedirect(); | 330 | $crawler = $client->followRedirect(); |
331 | 331 | ||
332 | $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text'])); | 332 | $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text'])); |
333 | $this->assertNotContains('config.form_feed.no_token', $body[0]); | 333 | $this->assertContains('config.form_feed.token_reset', $body[0]); |
334 | } | 334 | } |
335 | 335 | ||
336 | public function testGenerateTokenAjax() | 336 | public function testGenerateTokenAjax() |
@@ -351,6 +351,22 @@ class ConfigControllerTest extends WallabagCoreTestCase | |||
351 | $this->assertArrayHasKey('token', $content); | 351 | $this->assertArrayHasKey('token', $content); |
352 | } | 352 | } |
353 | 353 | ||
354 | public function testRevokeTokenAjax() | ||
355 | { | ||
356 | $this->logInAs('admin'); | ||
357 | $client = $this->getClient(); | ||
358 | |||
359 | $client->request( | ||
360 | 'GET', | ||
361 | '/revoke-token', | ||
362 | [], | ||
363 | [], | ||
364 | ['HTTP_X-Requested-With' => 'XMLHttpRequest'] | ||
365 | ); | ||
366 | |||
367 | $this->assertSame(200, $client->getResponse()->getStatusCode()); | ||
368 | } | ||
369 | |||
354 | public function testFeedUpdate() | 370 | public function testFeedUpdate() |
355 | { | 371 | { |
356 | $this->logInAs('admin'); | 372 | $this->logInAs('admin'); |
diff --git a/tests/Wallabag/CoreBundle/Controller/TagControllerTest.php b/tests/Wallabag/CoreBundle/Controller/TagControllerTest.php index be17dcf5..47c83a7b 100644 --- a/tests/Wallabag/CoreBundle/Controller/TagControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/TagControllerTest.php | |||
@@ -221,4 +221,50 @@ class TagControllerTest extends WallabagCoreTestCase | |||
221 | $this->assertInstanceOf(Tag::class, $newTag, 'Tag "specific label" exists.'); | 221 | $this->assertInstanceOf(Tag::class, $newTag, 'Tag "specific label" exists.'); |
222 | $this->assertTrue($newTag->hasEntry($freshEntry), 'Tag "specific label" is assigned to the entry.'); | 222 | $this->assertTrue($newTag->hasEntry($freshEntry), 'Tag "specific label" is assigned to the entry.'); |
223 | } | 223 | } |
224 | |||
225 | public function testAddUnicodeTagLabel() | ||
226 | { | ||
227 | $this->logInAs('admin'); | ||
228 | $client = $this->getClient(); | ||
229 | |||
230 | $entry = new Entry($this->getLoggedInUser()); | ||
231 | $entry->setUrl('http://0.0.0.0/tag-caché'); | ||
232 | $this->getEntityManager()->persist($entry); | ||
233 | $this->getEntityManager()->flush(); | ||
234 | $this->getEntityManager()->clear(); | ||
235 | |||
236 | $crawler = $client->request('GET', '/view/' . $entry->getId()); | ||
237 | |||
238 | $form = $crawler->filter('form[name=tag]')->form(); | ||
239 | |||
240 | $data = [ | ||
241 | 'tag[label]' => 'cache', | ||
242 | ]; | ||
243 | |||
244 | $client->submit($form, $data); | ||
245 | |||
246 | $crawler = $client->request('GET', '/view/' . $entry->getId()); | ||
247 | |||
248 | $form = $crawler->filter('form[name=tag]')->form(); | ||
249 | |||
250 | $data = [ | ||
251 | 'tag[label]' => 'caché', | ||
252 | ]; | ||
253 | |||
254 | $client->submit($form, $data); | ||
255 | |||
256 | $newEntry = $client->getContainer() | ||
257 | ->get('doctrine.orm.entity_manager') | ||
258 | ->getRepository('WallabagCoreBundle:Entry') | ||
259 | ->find($entry->getId()); | ||
260 | |||
261 | $tags = $newEntry->getTags()->toArray(); | ||
262 | foreach ($tags as $key => $tag) { | ||
263 | $tags[$key] = $tag->getLabel(); | ||
264 | } | ||
265 | |||
266 | $this->assertGreaterThanOrEqual(2, \count($tags)); | ||
267 | $this->assertNotFalse(array_search('cache', $tags, true), 'Tag cache is assigned to the entry'); | ||
268 | $this->assertNotFalse(array_search('caché', $tags, true), 'Tag caché is assigned to the entry'); | ||
269 | } | ||
224 | } | 270 | } |