From 67c99849ae03d41e94b144321d627e8c6ddd5fa3 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Thu, 21 Jan 2016 12:24:27 +0100 Subject: [PATCH] Use alias to get container parameters --- src/Wallabag/CoreBundle/Controller/ConfigController.php | 8 ++++---- src/Wallabag/CoreBundle/Controller/RssController.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Wallabag/CoreBundle/Controller/ConfigController.php b/src/Wallabag/CoreBundle/Controller/ConfigController.php index c7513f796..25e698206 100644 --- a/src/Wallabag/CoreBundle/Controller/ConfigController.php +++ b/src/Wallabag/CoreBundle/Controller/ConfigController.php @@ -133,10 +133,10 @@ class ConfigController extends Controller $userManager->updateUser($newUser, true); $config = new Config($newUser); - $config->setTheme($this->container->getParameter('wallabag_core.theme')); - $config->setItemsPerPage($this->container->getParameter('wallabag_core.items_on_page')); - $config->setRssLimit($this->container->getParameter('wallabag_core.rss_limit')); - $config->setLanguage($this->container->getParameter('wallabag_core.language')); + $config->setTheme($this->getParameter('wallabag_core.theme')); + $config->setItemsPerPage($this->getParameter('wallabag_core.items_on_page')); + $config->setRssLimit($this->getParameter('wallabag_core.rss_limit')); + $config->setLanguage($this->getParameter('wallabag_core.language')); $em->persist($config); diff --git a/src/Wallabag/CoreBundle/Controller/RssController.php b/src/Wallabag/CoreBundle/Controller/RssController.php index 2b7ef5985..a4f7a200e 100644 --- a/src/Wallabag/CoreBundle/Controller/RssController.php +++ b/src/Wallabag/CoreBundle/Controller/RssController.php @@ -84,7 +84,7 @@ class RssController extends Controller $pagerAdapter = new DoctrineORMAdapter($qb->getQuery()); $entries = new Pagerfanta($pagerAdapter); - $perPage = $user->getConfig()->getRssLimit() ?: $this->container->getParameter('rss_limit'); + $perPage = $user->getConfig()->getRssLimit() ?: $this->getParameter('wallabag_core.rss_limit'); $entries->setMaxPerPage($perPage); return $this->render('WallabagCoreBundle:Entry:entries.xml.twig', array(