From 1ec44a346bbd89acf637bbbff86952f7231d2675 Mon Sep 17 00:00:00 2001 From: Eloi Coutant Date: Wed, 16 Jan 2019 21:54:38 +0100 Subject: [PATCH 1/5] Update composer.json to add php-tidy (ext-tidy) Should fix https://github.com/wallabag/wallabag/issues/3844 for milestone https://github.com/wallabag/wallabag/milestone/63. --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index 97613ef7a..56ae3f23d 100644 --- a/composer.json +++ b/composer.json @@ -43,6 +43,7 @@ "ext-iconv": "*", "ext-tokenizer": "*", "ext-pdo": "*", + "ext-tidy": "*", "symfony/symfony": "~3.3.13", "doctrine/orm": "^2.5.12", "doctrine/doctrine-bundle": "^1.8.0", From 293730656d696dab8cdbc8447a0e970a58ff77d2 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Fri, 18 Jan 2019 11:14:28 +0100 Subject: [PATCH 2/5] Add dedicated email for site config issue Instead of sending an email to the devs, it now creates an issue on GitHub using a zap from zapier. --- .../Resources/views/themes/baggy/Entry/entry.html.twig | 2 +- .../Resources/views/themes/material/Entry/entry.html.twig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig index e7d42b3dc..e87ba201a 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig @@ -38,7 +38,7 @@ {% if craue_setting('export_epub') %}
  • EPUB
  • {% endif %} {% if craue_setting('export_mobi') %}
  • MOBI
  • {% endif %} {% if craue_setting('export_pdf') %}
  • PDF
  • {% endif %} -
  • {{ 'entry.view.left_menu.problem.label'|trans }}
  • +
  • {{ 'entry.view.left_menu.problem.label'|trans }}
  • diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig index c6c19de6b..15b4d82f6 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig @@ -209,7 +209,7 @@
  • - + error {{ 'entry.view.left_menu.problem.label'|trans }} From a2e60dd39382d19642346b3848d22ce1d28d4cf3 Mon Sep 17 00:00:00 2001 From: Tristan Hill Date: Sat, 22 Dec 2018 11:36:13 +0000 Subject: [PATCH 3/5] status and favourite are actually strings in the import so use == --- src/Wallabag/ImportBundle/Import/PocketImport.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Wallabag/ImportBundle/Import/PocketImport.php b/src/Wallabag/ImportBundle/Import/PocketImport.php index d36433899..a9b43993f 100644 --- a/src/Wallabag/ImportBundle/Import/PocketImport.php +++ b/src/Wallabag/ImportBundle/Import/PocketImport.php @@ -206,10 +206,10 @@ class PocketImport extends AbstractImport $this->fetchContent($entry, $url); // 0, 1, 2 - 1 if the item is archived - 2 if the item should be deleted - $entry->setArchived(1 === $importedEntry['status'] || $this->markAsRead); + $entry->setArchived(1 == $importedEntry['status'] || $this->markAsRead); // 0 or 1 - 1 If the item is starred - $entry->setStarred(1 === $importedEntry['favorite']); + $entry->setStarred(1 == $importedEntry['favorite']); $title = 'Untitled'; if (isset($importedEntry['resolved_title']) && '' !== $importedEntry['resolved_title']) { From 8d082488e9e62914d79c179d376d1a0529183c49 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Mon, 28 Jan 2019 06:03:16 +0100 Subject: [PATCH 4/5] Improve checks & add tests --- src/Wallabag/ImportBundle/Import/PocketImport.php | 6 +++--- tests/Wallabag/ImportBundle/Import/PocketImportTest.php | 7 +++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Wallabag/ImportBundle/Import/PocketImport.php b/src/Wallabag/ImportBundle/Import/PocketImport.php index a9b43993f..5737928d1 100644 --- a/src/Wallabag/ImportBundle/Import/PocketImport.php +++ b/src/Wallabag/ImportBundle/Import/PocketImport.php @@ -206,10 +206,10 @@ class PocketImport extends AbstractImport $this->fetchContent($entry, $url); // 0, 1, 2 - 1 if the item is archived - 2 if the item should be deleted - $entry->setArchived(1 == $importedEntry['status'] || $this->markAsRead); + $entry->setArchived(1 === (int) $importedEntry['status'] || $this->markAsRead); - // 0 or 1 - 1 If the item is starred - $entry->setStarred(1 == $importedEntry['favorite']); + // 0 or 1 - 1 if the item is starred + $entry->setStarred(1 === (int) $importedEntry['favorite']); $title = 'Untitled'; if (isset($importedEntry['resolved_title']) && '' !== $importedEntry['resolved_title']) { diff --git a/tests/Wallabag/ImportBundle/Import/PocketImportTest.php b/tests/Wallabag/ImportBundle/Import/PocketImportTest.php index baa5d9057..8083f1a88 100644 --- a/tests/Wallabag/ImportBundle/Import/PocketImportTest.php +++ b/tests/Wallabag/ImportBundle/Import/PocketImportTest.php @@ -226,6 +226,13 @@ class PocketImportTest extends TestCase ->method('getRepository') ->willReturn($entryRepo); + $this->em + ->expects($this->any()) + ->method('persist') + ->with($this->callback(function ($persistedEntry) { + return $persistedEntry->isArchived() && $persistedEntry->isStarred(); + })); + $entry = new Entry($this->user); $this->contentProxy From 7e04bd4ca4060abb15e82ce9210de5d5c5dae71a Mon Sep 17 00:00:00 2001 From: Jonathan Crooke Date: Thu, 31 Jan 2019 22:14:53 +0100 Subject: [PATCH 5/5] Fix broken 2 factor auth logo image --- .../Resources/views/TwoFactor/email_auth_code.html.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Wallabag/UserBundle/Resources/views/TwoFactor/email_auth_code.html.twig b/src/Wallabag/UserBundle/Resources/views/TwoFactor/email_auth_code.html.twig index ecc1d79a2..cd5aaf407 100644 --- a/src/Wallabag/UserBundle/Resources/views/TwoFactor/email_auth_code.html.twig +++ b/src/Wallabag/UserBundle/Resources/views/TwoFactor/email_auth_code.html.twig @@ -74,7 +74,7 @@ - +
    logologo

    wallabag

    {{ "auth_code.on"|trans({}, 'wallabag_user') }} {{ wallabag_url }}