X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FResources%2Fconfig%2Fservices.yml;h=9786ac279d8e5475c4754048fbf51f7a7fd3b3ed;hb=5a619812ca3eb05a82a023ccdaee13501eb8d45f;hp=a4b727f42b57d21ef4b3a9eedc881370ecca8cef;hpb=4ad6f5878a7e7ab6359151b049fb49b9dd2c78ec;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Resources/config/services.yml b/src/Wallabag/CoreBundle/Resources/config/services.yml index a4b727f4..9786ac27 100644 --- a/src/Wallabag/CoreBundle/Resources/config/services.yml +++ b/src/Wallabag/CoreBundle/Resources/config/services.yml @@ -30,7 +30,7 @@ services: - "@doctrine" wallabag_core.subscriber.table_prefix: - class: Wallabag\CoreBundle\Subscriber\TablePrefixSubscriber + class: Wallabag\CoreBundle\Event\Subscriber\TablePrefixSubscriber arguments: - "%database_table_prefix%" tags: @@ -40,7 +40,7 @@ services: class: Graby\Graby arguments: - - error_message: "wallabag can't retrieve contents for this article. Please report this issue to us." + error_message: '%wallabag_core.fetching_error_message%' http_client: user_agents: 'lifehacker.com': 'PHP/5.2' @@ -55,6 +55,7 @@ services: '.fok.nl': 'Googlebot/2.1' 'getpocket.com': 'PHP/5.2' 'iansommerville.com': 'PHP/5.2' + '.slashdot.org': 'PHP/5.2' calls: - [ setLogger, [ "@logger" ] ] tags: @@ -91,7 +92,7 @@ services: wallabag_core.helper.entries_export: class: Wallabag\CoreBundle\Helper\EntriesExport arguments: - - "@craue_config" + - '@=service(''craue_config'').get(''wallabag_url'')' - src/Wallabag/CoreBundle/Resources/public/themes/_global/img/appicon/apple-touch-icon-152.png wallabag.operator.array.matches: @@ -129,3 +130,31 @@ services: arguments: - '@twig' - '%kernel.debug%' + + wallabag_core.subscriber.sqlite_cascade_delete: + class: Wallabag\CoreBundle\Event\Subscriber\SQLiteCascadeDeleteSubscriber + arguments: + - "@doctrine" + tags: + - { name: doctrine.event_subscriber } + + wallabag_core.subscriber.download_images: + class: Wallabag\CoreBundle\Event\Subscriber\DownloadImagesSubscriber + arguments: + - "@doctrine.orm.default_entity_manager" + - "@wallabag_core.entry.download_images" + - '@=service(''craue_config'').get(''download_images_enabled'')' + - "@logger" + tags: + - { name: kernel.event_subscriber } + + wallabag_core.entry.download_images: + class: Wallabag\CoreBundle\Helper\DownloadImages + arguments: + - "@wallabag_core.entry.download_images.client" + - "%kernel.root_dir%/../web/assets/images" + - '@=service(''craue_config'').get(''wallabag_url'')' + - "@logger" + + wallabag_core.entry.download_images.client: + class: GuzzleHttp\Client