From a1aac10bd5427d5e64dcb0e1ab955ba2b1edb1b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 28 Jul 2023 11:21:41 +0200 Subject: [PATCH] Remove mobi export Fix #6746 --- .../Version20230728091417.php | 24 +++++++++++++++++++ app/config/config.yml | 5 +--- app/config/wallabag.yml | 4 ---- composer.json | 1 - .../Resources/views/Entry/entries.html.twig | 1 - .../Resources/views/Entry/entry.html.twig | 1 - .../Resources/views/Static/about.html.twig | 1 - translations/CraueConfigBundle.cs.yml | 1 - translations/CraueConfigBundle.da.yml | 1 - translations/CraueConfigBundle.de.yml | 1 - translations/CraueConfigBundle.el.yml | 1 - translations/CraueConfigBundle.en.yml | 1 - translations/CraueConfigBundle.es.yml | 1 - translations/CraueConfigBundle.fa.yml | 1 - translations/CraueConfigBundle.fr.yml | 1 - translations/CraueConfigBundle.gl.yml | 1 - translations/CraueConfigBundle.hu.yml | 1 - translations/CraueConfigBundle.id.yml | 1 - translations/CraueConfigBundle.it.yml | 1 - translations/CraueConfigBundle.ja.yml | 1 - translations/CraueConfigBundle.ko.yml | 1 - translations/CraueConfigBundle.nb.yml | 1 - translations/CraueConfigBundle.nl.yml | 1 - translations/CraueConfigBundle.oc.yml | 1 - translations/CraueConfigBundle.pl.yml | 1 - translations/CraueConfigBundle.pt.yml | 1 - translations/CraueConfigBundle.ro.yml | 1 - translations/CraueConfigBundle.ru.yml | 1 - translations/CraueConfigBundle.th.yml | 1 - translations/CraueConfigBundle.tr.yml | 1 - translations/CraueConfigBundle.uk.yml | 1 - translations/CraueConfigBundle.zh.yml | 1 - 32 files changed, 25 insertions(+), 37 deletions(-) create mode 100644 app/DoctrineMigrations/Version20230728091417.php diff --git a/app/DoctrineMigrations/Version20230728091417.php b/app/DoctrineMigrations/Version20230728091417.php new file mode 100644 index 000000000..934a9c030 --- /dev/null +++ b/app/DoctrineMigrations/Version20230728091417.php @@ -0,0 +1,24 @@ +addSql('DELETE FROM' . $this->getTable('internal_setting') . " WHERE name = 'export_mobi';"); + } + + public function down(Schema $schema): void + { + $this->addSql('INSERT INTO ' . $this->getTable('internal_setting') . " (name, value, section) VALUES ('export_mobi', '1', 'export');"); + } +} diff --git a/app/config/config.yml b/app/config/config.yml index b31b29e0d..63980e5b5 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -100,8 +100,6 @@ fos_rest: - 'application/pdf' epub: - 'application/epub+zip' - mobi: - - 'application/x-mobipocket-ebook' view_response_listener: 'force' formats: xml: true @@ -110,13 +108,12 @@ fos_rest: csv: true pdf: true epub: true - mobi: true failed_validation: HTTP_BAD_REQUEST routing_loader: false format_listener: enabled: true rules: - - { path: "^/api/entries/([0-9]+)/export.(.*)", priorities: ['epub', 'mobi', 'pdf', 'txt', 'csv'], fallback_format: json, prefer_extension: false } + - { path: "^/api/entries/([0-9]+)/export.(.*)", priorities: ['epub', 'pdf', 'txt', 'csv'], fallback_format: json, prefer_extension: false } - { path: "^/api", priorities: ['json', 'xml'], fallback_format: json, prefer_extension: false } - { path: "^/annotations", priorities: ['json', 'xml'], fallback_format: json, prefer_extension: false } diff --git a/app/config/wallabag.yml b/app/config/wallabag.yml index bbbe46939..277fde6e6 100644 --- a/app/config/wallabag.yml +++ b/app/config/wallabag.yml @@ -85,10 +85,6 @@ wallabag_core: name: export_epub value: 1 section: export - - - name: export_mobi - value: 0 - section: export - name: export_pdf value: 1 diff --git a/composer.json b/composer.json index 03b0a44ee..e61035b24 100644 --- a/composer.json +++ b/composer.json @@ -147,7 +147,6 @@ "twig/extra-bundle": "^3.4", "twig/string-extra": "^3.4", "twig/twig": "^3.4.3", - "wallabag/php-mobi": "~1.0", "wallabag/phpepub": "^4.0.10", "willdurand/hateoas": "^3.8", "willdurand/hateoas-bundle": "~2.1" diff --git a/src/Wallabag/CoreBundle/Resources/views/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/Entry/entries.html.twig index 6ad6f562e..55b58180b 100644 --- a/src/Wallabag/CoreBundle/Resources/views/Entry/entries.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/Entry/entries.html.twig @@ -101,7 +101,6 @@

{{ 'entry.list.export_title'|trans }}