From be9d693e74e41fdcdb18bf80aa1aff614154bcce Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Thu, 1 Jun 2017 10:42:19 +0200 Subject: [PATCH 1/5] remove craueconfig domain name setting and add a proper one in parameters --- .../CraueConfigBundle/translations/CraueConfigBundle.da.yml | 1 - .../CraueConfigBundle/translations/CraueConfigBundle.de.yml | 1 - .../CraueConfigBundle/translations/CraueConfigBundle.en.yml | 1 - .../CraueConfigBundle/translations/CraueConfigBundle.es.yml | 1 - .../CraueConfigBundle/translations/CraueConfigBundle.fa.yml | 1 - .../CraueConfigBundle/translations/CraueConfigBundle.fr.yml | 1 - .../CraueConfigBundle/translations/CraueConfigBundle.it.yml | 1 - .../CraueConfigBundle/translations/CraueConfigBundle.oc.yml | 1 - .../CraueConfigBundle/translations/CraueConfigBundle.pl.yml | 1 - .../CraueConfigBundle/translations/CraueConfigBundle.pt.yml | 1 - .../CraueConfigBundle/translations/CraueConfigBundle.ro.yml | 1 - app/config/parameters.yml.dist | 2 ++ app/config/wallabag.yml | 1 + src/Wallabag/CoreBundle/Controller/ConfigController.php | 2 +- src/Wallabag/CoreBundle/DependencyInjection/Configuration.php | 1 + .../CoreBundle/DependencyInjection/WallabagCoreExtension.php | 1 + src/Wallabag/CoreBundle/Resources/config/services.yml | 2 +- src/Wallabag/UserBundle/Resources/config/services.yml | 2 +- 18 files changed, 8 insertions(+), 14 deletions(-) diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml index 20e938f5a..5475e571e 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml @@ -20,7 +20,6 @@ share_twitter: Aktiver deling gennem Twitter share_unmark: Aktiver deling gennem Unmark.it show_printlink: Vis et link til print-indhold wallabag_support_url: Support-URL for wallabag -wallabag_url: URL for *sin* wallabag-installation entry: "artikel" export: "eksport" import: "import" diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml index 526d41bc5..f57db3032 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml @@ -20,7 +20,6 @@ share_twitter: Teilen zu Twitter aktiveren share_unmark: Teilen zu Unmark.it aktiveren show_printlink: Link anzeigen, um den Inhalt auszudrucken wallabag_support_url: Support-URL für wallabag -wallabag_url: URL von *deiner* wallabag-Instanz entry: "Artikel" export: "Export" import: "Import" diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml index 3c0037f38..1e4f46688 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml @@ -20,7 +20,6 @@ share_twitter: Enable share to Twitter share_unmark: Enable share to Unmark.it show_printlink: Display a link to print content wallabag_support_url: Support URL for wallabag -wallabag_url: URL of *your* wallabag instance entry: "article" export: "export" import: "import" diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml index 998696690..46ed40406 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml @@ -20,7 +20,6 @@ share_twitter: Activar compartir con Twitter share_unmark: Activar compartir con Unmark.it show_printlink: Mostrar un enlace para imprimir contenido wallabag_support_url: URL de soporte de wallabag -wallabag_url: URL de *tu* instancia de wallabag entry: "artículo" export: "exportar" import: "importar" diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml index 2e1307e58..f8da4acff 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml @@ -20,7 +20,6 @@ share_twitter: فعال‌سازی هم‌رسانی به Twitter share_unmark: فعال‌سازی هم‌رسانی به Unmark.it show_printlink: نمایش پیوندی برای چاپ مطلب wallabag_support_url: نشانی صفحهٔ پشتیبانی wallabag -wallabag_url: نشانی صفحهٔ wallabag *شما* entry: "مقاله" export: "برون‌سپاری" import: "درون‌ریزی" diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml index 454053ad2..a79409b42 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml @@ -20,7 +20,6 @@ share_twitter: Activer le partage vers Twitter share_unmark: Activer le partage vers Unmark.it show_printlink: Afficher un lien pour imprimer wallabag_support_url: URL de support de wallabag -wallabag_url: URL de *votre* instance de wallabag entry: "article" export: "export" import: "import" diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml index 4dbd2ff8e..dd4def4bf 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml @@ -20,7 +20,6 @@ share_twitter: Abilita la condivisione con Twitter share_unmark: Abilita la condivisione con Unmark.it show_printlink: Mostra un collegamento per stampare il contenuto wallabag_support_url: URL di supporto per wallabag -wallabag_url: URL della *tua* installazione di wallabag entry: "contenuto" export: "esporta" import: "importa" diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml index 00c06638d..66d9ae266 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml @@ -20,7 +20,6 @@ share_twitter: Activar lo partatge cap a Twitter share_unmark: Activar lo partatge cap a Unmark.it show_printlink: Afichar un ligam per imprimir wallabag_support_url: URL d'assisténcia de wallabag -wallabag_url: URL de *vòstra* instància de wallabag entry: "article" export: "expòrt" import: "impòrt" diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml index ada11b3aa..04ad4fd3c 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml @@ -20,7 +20,6 @@ share_twitter: Włącz udostępnianie dla Twitter share_unmark: Włącz udostępnianie dla Unmark.it show_printlink: Pokaż link do wydrukowania zawartości wallabag_support_url: Adres URL wsparcia dla wallabag -wallabag_url: Adres *twojej* instacji wallabag entry: "artykuł" export: "eksport" import: "import" diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml index 59af96105..77e22b375 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml @@ -20,7 +20,6 @@ share_twitter: Habilitar compartilhamento para o Twitter share_unmark: Habilitar compartilhamento para o Unmark.it show_printlink: Mostrar um link para imprimir o conteúdo wallabag_support_url: URL de Suporte do wallabag -wallabag_url: URL de *sua* instância do wallabag entry: "artigo" export: "exportar" import: "importar" diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml index 104e37c6a..1b4bfb5bc 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml @@ -20,7 +20,6 @@ share_twitter: Permite share către Twitter share_unmark: Permite share către Unmark.it show_printlink: Afișează un link pentru a printa content-ul wallabag_support_url: URL-ul de suport pentru wallabag -wallabag_url: URL-ul instanței tale wallabag entry: "alticol" export: "exportă" import: "importă" diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist index afcee0399..c00ffb0e8 100644 --- a/app/config/parameters.yml.dist +++ b/app/config/parameters.yml.dist @@ -23,6 +23,8 @@ parameters: # with PostgreSQL and SQLite, you must set "utf8" database_charset: utf8mb4 + domain_name: wallabag.me + mailer_transport: smtp mailer_host: 127.0.0.1 mailer_user: ~ diff --git a/app/config/wallabag.yml b/app/config/wallabag.yml index d8c593c67..65bac1b47 100644 --- a/app/config/wallabag.yml +++ b/app/config/wallabag.yml @@ -26,6 +26,7 @@ wallabag_core: fetching_error_message: | wallabag can't retrieve contents for this article. Please troubleshoot this issue. api_limit_mass_actions: 10 + domain_name: '%domain_name%' default_internal_settings: - name: share_public diff --git a/src/Wallabag/CoreBundle/Controller/ConfigController.php b/src/Wallabag/CoreBundle/Controller/ConfigController.php index 0e61c6420..89d27425c 100644 --- a/src/Wallabag/CoreBundle/Controller/ConfigController.php +++ b/src/Wallabag/CoreBundle/Controller/ConfigController.php @@ -151,7 +151,7 @@ class ConfigController extends Controller 'token' => $config->getRssToken(), ], 'twofactor_auth' => $this->getParameter('twofactor_auth'), - 'wallabag_url' => $this->get('craue_config')->get('wallabag_url'), + 'wallabag_url' => $this->getParameter('domain_name'), 'enabled_users' => $this->getDoctrine() ->getRepository('WallabagUserBundle:User') ->getSumEnabledUsers(), diff --git a/src/Wallabag/CoreBundle/DependencyInjection/Configuration.php b/src/Wallabag/CoreBundle/DependencyInjection/Configuration.php index 33df92d3c..37f7c761c 100644 --- a/src/Wallabag/CoreBundle/DependencyInjection/Configuration.php +++ b/src/Wallabag/CoreBundle/DependencyInjection/Configuration.php @@ -62,6 +62,7 @@ class Configuration implements ConfigurationInterface ->end() ->end() ->end() + ->scalarNode('domain_name') ->end() ->end() ; diff --git a/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php b/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php index b4d8a3866..d0b4351e9 100644 --- a/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php +++ b/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php @@ -29,6 +29,7 @@ class WallabagCoreExtension extends Extension $container->setParameter('wallabag_core.fetching_error_message_title', $config['fetching_error_message_title']); $container->setParameter('wallabag_core.api_limit_mass_actions', $config['api_limit_mass_actions']); $container->setParameter('wallabag_core.default_internal_settings', $config['default_internal_settings']); + $container->setParameter('wallabag_core.domain_name', $config['domain_name']); $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); $loader->load('services.yml'); diff --git a/src/Wallabag/CoreBundle/Resources/config/services.yml b/src/Wallabag/CoreBundle/Resources/config/services.yml index a9b0d2d56..a82f36ceb 100644 --- a/src/Wallabag/CoreBundle/Resources/config/services.yml +++ b/src/Wallabag/CoreBundle/Resources/config/services.yml @@ -122,7 +122,7 @@ services: wallabag_core.helper.entries_export: class: Wallabag\CoreBundle\Helper\EntriesExport arguments: - - '@=service(''craue_config'').get(''wallabag_url'')' + - '%domain_name%' - src/Wallabag/CoreBundle/Resources/public/themes/_global/img/appicon/apple-touch-icon-152.png wallabag.operator.array.matches: diff --git a/src/Wallabag/UserBundle/Resources/config/services.yml b/src/Wallabag/UserBundle/Resources/config/services.yml index 72f6f12c1..bfba60103 100644 --- a/src/Wallabag/UserBundle/Resources/config/services.yml +++ b/src/Wallabag/UserBundle/Resources/config/services.yml @@ -7,7 +7,7 @@ services: - "%scheb_two_factor.email.sender_email%" - "%scheb_two_factor.email.sender_name%" - '@=service(''craue_config'').get(''wallabag_support_url'')' - - '@=service(''craue_config'').get(''wallabag_url'')' + - '%domain_name%' wallabag_user.password_resetting: class: Wallabag\UserBundle\EventListener\PasswordResettingListener From d6c4c484c46706f9eecf81af3f64649f014418e1 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Tue, 6 Jun 2017 16:04:51 +0200 Subject: [PATCH 2/5] add migration --- .../Version20170606155640.php | 52 +++++++++++++++++++ app/config/wallabag.yml | 4 -- .../DependencyInjection/Configuration.php | 1 + 3 files changed, 53 insertions(+), 4 deletions(-) create mode 100644 app/DoctrineMigrations/Version20170606155640.php diff --git a/app/DoctrineMigrations/Version20170606155640.php b/app/DoctrineMigrations/Version20170606155640.php new file mode 100644 index 000000000..1b2340448 --- /dev/null +++ b/app/DoctrineMigrations/Version20170606155640.php @@ -0,0 +1,52 @@ +container = $container; + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix').$tableName; + } + + /** + * @param Schema $schema + */ + public function up(Schema $schema) + { + $apiUserRegistration = $this->container + ->get('doctrine.orm.default_entity_manager') + ->getConnection() + ->fetchArray('SELECT * FROM '.$this->getTable('craue_config_setting')." WHERE name = 'wallabag_url'"); + + $this->skipIf(false === $apiUserRegistration, 'It seems that you already played this migration.'); + + $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'wallabag_url'"); + } + + /** + * @param Schema $schema + */ + public function down(Schema $schema) + { + $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('wallabag_url', 'wallabag.me', 'misc')"); + } +} diff --git a/app/config/wallabag.yml b/app/config/wallabag.yml index 65bac1b47..d03450a09 100644 --- a/app/config/wallabag.yml +++ b/app/config/wallabag.yml @@ -148,10 +148,6 @@ wallabag_core: name: wallabag_support_url value: https://www.wallabag.org/pages/support.html section: misc - - - name: wallabag_url - value: http://v2.wallabag.org - section: misc - name: api_user_registration value: 0 diff --git a/src/Wallabag/CoreBundle/DependencyInjection/Configuration.php b/src/Wallabag/CoreBundle/DependencyInjection/Configuration.php index 37f7c761c..a6f53714e 100644 --- a/src/Wallabag/CoreBundle/DependencyInjection/Configuration.php +++ b/src/Wallabag/CoreBundle/DependencyInjection/Configuration.php @@ -62,6 +62,7 @@ class Configuration implements ConfigurationInterface ->end() ->end() ->end() + ->end() ->scalarNode('domain_name') ->end() ->end() From e48b238a3e2c387be1f897e6f2c3c481d25f5203 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Tue, 6 Jun 2017 16:18:25 +0200 Subject: [PATCH 3/5] fix tests --- app/config/parameters_test.yml | 1 + src/Wallabag/CoreBundle/Resources/config/services.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/config/parameters_test.yml b/app/config/parameters_test.yml index 010785e67..92f0364fb 100644 --- a/app/config/parameters_test.yml +++ b/app/config/parameters_test.yml @@ -8,3 +8,4 @@ parameters: test_database_path: "%env(TEST_DATABASE_PATH)%" env(TEST_DATABASE_PATH): "%kernel.root_dir%/../data/db/wallabag_test.sqlite" test_database_charset: utf8 + domain_name: 'http://v2.wallabag.org' diff --git a/src/Wallabag/CoreBundle/Resources/config/services.yml b/src/Wallabag/CoreBundle/Resources/config/services.yml index a82f36ceb..6e2c97615 100644 --- a/src/Wallabag/CoreBundle/Resources/config/services.yml +++ b/src/Wallabag/CoreBundle/Resources/config/services.yml @@ -195,7 +195,7 @@ services: arguments: - "@wallabag_core.entry.download_images.client" - "%kernel.root_dir%/../web/assets/images" - - '@=service(''craue_config'').get(''wallabag_url'')' + - '%wallabag_core.domain_name%' - "@logger" wallabag_core.entry.download_images.client: From 80f4d85ac92ab4dc490c51f2d831ac7fa3853826 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Thu, 8 Jun 2017 19:15:33 +0200 Subject: [PATCH 4/5] Review --- app/DoctrineMigrations/Version20170606155640.php | 3 ++- app/config/parameters.yml.dist | 2 +- app/config/parameters_test.yml | 1 - app/config/wallabag.yml | 1 - src/Wallabag/CoreBundle/DependencyInjection/Configuration.php | 2 -- .../CoreBundle/DependencyInjection/WallabagCoreExtension.php | 1 - src/Wallabag/CoreBundle/Resources/config/services.yml | 2 +- tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php | 2 +- 8 files changed, 5 insertions(+), 9 deletions(-) diff --git a/app/DoctrineMigrations/Version20170606155640.php b/app/DoctrineMigrations/Version20170606155640.php index 1b2340448..e9b504283 100644 --- a/app/DoctrineMigrations/Version20170606155640.php +++ b/app/DoctrineMigrations/Version20170606155640.php @@ -8,7 +8,8 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Add api_user_registration in craue_config_setting. + * Remove wallabag_url from craue_config_setting. + * It has been moved into the parameters.yml */ class Version20170606155640 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist index c00ffb0e8..d827219a6 100644 --- a/app/config/parameters.yml.dist +++ b/app/config/parameters.yml.dist @@ -23,7 +23,7 @@ parameters: # with PostgreSQL and SQLite, you must set "utf8" database_charset: utf8mb4 - domain_name: wallabag.me + domain_name: http://your-wallabag-url-instance.com mailer_transport: smtp mailer_host: 127.0.0.1 diff --git a/app/config/parameters_test.yml b/app/config/parameters_test.yml index 92f0364fb..010785e67 100644 --- a/app/config/parameters_test.yml +++ b/app/config/parameters_test.yml @@ -8,4 +8,3 @@ parameters: test_database_path: "%env(TEST_DATABASE_PATH)%" env(TEST_DATABASE_PATH): "%kernel.root_dir%/../data/db/wallabag_test.sqlite" test_database_charset: utf8 - domain_name: 'http://v2.wallabag.org' diff --git a/app/config/wallabag.yml b/app/config/wallabag.yml index d03450a09..51b7e4e30 100644 --- a/app/config/wallabag.yml +++ b/app/config/wallabag.yml @@ -26,7 +26,6 @@ wallabag_core: fetching_error_message: | wallabag can't retrieve contents for this article. Please troubleshoot this issue. api_limit_mass_actions: 10 - domain_name: '%domain_name%' default_internal_settings: - name: share_public diff --git a/src/Wallabag/CoreBundle/DependencyInjection/Configuration.php b/src/Wallabag/CoreBundle/DependencyInjection/Configuration.php index a6f53714e..33df92d3c 100644 --- a/src/Wallabag/CoreBundle/DependencyInjection/Configuration.php +++ b/src/Wallabag/CoreBundle/DependencyInjection/Configuration.php @@ -63,8 +63,6 @@ class Configuration implements ConfigurationInterface ->end() ->end() ->end() - ->scalarNode('domain_name') - ->end() ->end() ; diff --git a/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php b/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php index d0b4351e9..b4d8a3866 100644 --- a/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php +++ b/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php @@ -29,7 +29,6 @@ class WallabagCoreExtension extends Extension $container->setParameter('wallabag_core.fetching_error_message_title', $config['fetching_error_message_title']); $container->setParameter('wallabag_core.api_limit_mass_actions', $config['api_limit_mass_actions']); $container->setParameter('wallabag_core.default_internal_settings', $config['default_internal_settings']); - $container->setParameter('wallabag_core.domain_name', $config['domain_name']); $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); $loader->load('services.yml'); diff --git a/src/Wallabag/CoreBundle/Resources/config/services.yml b/src/Wallabag/CoreBundle/Resources/config/services.yml index 6e2c97615..8b00700f6 100644 --- a/src/Wallabag/CoreBundle/Resources/config/services.yml +++ b/src/Wallabag/CoreBundle/Resources/config/services.yml @@ -195,7 +195,7 @@ services: arguments: - "@wallabag_core.entry.download_images.client" - "%kernel.root_dir%/../web/assets/images" - - '%wallabag_core.domain_name%' + - '%domain_name%' - "@logger" wallabag_core.entry.download_images.client: diff --git a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php index cc7b3672c..581ee9523 100644 --- a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php @@ -1000,7 +1000,7 @@ class EntryControllerTest extends WallabagCoreTestCase $this->assertEquals($url, $entry->getUrl()); $this->assertContains('Perpignan', $entry->getTitle()); // instead of checking for the filename (which might change) check that the image is now local - $this->assertContains('http://v2.wallabag.org/assets/images/', $entry->getContent()); + $this->assertContains('http://your-wallabag-url-instance.com/assets/images/', $entry->getContent()); $client->getContainer()->get('craue_config')->set('download_images_enabled', 0); } From 1a94252831638cf41f0fe489939dee9dae1c1251 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Fri, 9 Jun 2017 10:07:27 +0200 Subject: [PATCH 5/5] Promote https --- app/config/parameters.yml.dist | 2 +- tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist index d827219a6..914fb1efc 100644 --- a/app/config/parameters.yml.dist +++ b/app/config/parameters.yml.dist @@ -23,7 +23,7 @@ parameters: # with PostgreSQL and SQLite, you must set "utf8" database_charset: utf8mb4 - domain_name: http://your-wallabag-url-instance.com + domain_name: https://your-wallabag-url-instance.com mailer_transport: smtp mailer_host: 127.0.0.1 diff --git a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php index 581ee9523..4ffe02de9 100644 --- a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php @@ -1000,7 +1000,7 @@ class EntryControllerTest extends WallabagCoreTestCase $this->assertEquals($url, $entry->getUrl()); $this->assertContains('Perpignan', $entry->getTitle()); // instead of checking for the filename (which might change) check that the image is now local - $this->assertContains('http://your-wallabag-url-instance.com/assets/images/', $entry->getContent()); + $this->assertContains('https://your-wallabag-url-instance.com/assets/images/', $entry->getContent()); $client->getContainer()->get('craue_config')->set('download_images_enabled', 0); }