From be9d693e74e41fdcdb18bf80aa1aff614154bcce Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Thu, 1 Jun 2017 10:42:19 +0200 Subject: remove craueconfig domain name setting and add a proper one in parameters --- src/Wallabag/CoreBundle/Controller/ConfigController.php | 2 +- src/Wallabag/CoreBundle/DependencyInjection/Configuration.php | 1 + src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php | 1 + src/Wallabag/CoreBundle/Resources/config/services.yml | 2 +- src/Wallabag/UserBundle/Resources/config/services.yml | 2 +- 5 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/Wallabag') diff --git a/src/Wallabag/CoreBundle/Controller/ConfigController.php b/src/Wallabag/CoreBundle/Controller/ConfigController.php index 0e61c642..89d27425 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 33df92d3..37f7c761 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 b4d8a386..d0b4351e 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 a9b0d2d5..a82f36ce 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 72f6f12c..bfba6010 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 -- cgit v1.2.3