diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-01-21 12:24:27 +0100 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-01-31 14:48:26 +0100 |
commit | 67c99849ae03d41e94b144321d627e8c6ddd5fa3 (patch) | |
tree | 8d3a18db7e12e3f3433a95fecb3df45a976f957c | |
parent | d6ba77e888064dcf5757fb008426eb8bfcd6dd4c (diff) | |
download | wallabag-67c99849ae03d41e94b144321d627e8c6ddd5fa3.tar.gz wallabag-67c99849ae03d41e94b144321d627e8c6ddd5fa3.tar.zst wallabag-67c99849ae03d41e94b144321d627e8c6ddd5fa3.zip |
Use alias to get container parameters
-rw-r--r-- | src/Wallabag/CoreBundle/Controller/ConfigController.php | 8 | ||||
-rw-r--r-- | 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 c7513f79..25e69820 100644 --- a/src/Wallabag/CoreBundle/Controller/ConfigController.php +++ b/src/Wallabag/CoreBundle/Controller/ConfigController.php | |||
@@ -133,10 +133,10 @@ class ConfigController extends Controller | |||
133 | $userManager->updateUser($newUser, true); | 133 | $userManager->updateUser($newUser, true); |
134 | 134 | ||
135 | $config = new Config($newUser); | 135 | $config = new Config($newUser); |
136 | $config->setTheme($this->container->getParameter('wallabag_core.theme')); | 136 | $config->setTheme($this->getParameter('wallabag_core.theme')); |
137 | $config->setItemsPerPage($this->container->getParameter('wallabag_core.items_on_page')); | 137 | $config->setItemsPerPage($this->getParameter('wallabag_core.items_on_page')); |
138 | $config->setRssLimit($this->container->getParameter('wallabag_core.rss_limit')); | 138 | $config->setRssLimit($this->getParameter('wallabag_core.rss_limit')); |
139 | $config->setLanguage($this->container->getParameter('wallabag_core.language')); | 139 | $config->setLanguage($this->getParameter('wallabag_core.language')); |
140 | 140 | ||
141 | $em->persist($config); | 141 | $em->persist($config); |
142 | 142 | ||
diff --git a/src/Wallabag/CoreBundle/Controller/RssController.php b/src/Wallabag/CoreBundle/Controller/RssController.php index 2b7ef598..a4f7a200 100644 --- a/src/Wallabag/CoreBundle/Controller/RssController.php +++ b/src/Wallabag/CoreBundle/Controller/RssController.php | |||
@@ -84,7 +84,7 @@ class RssController extends Controller | |||
84 | $pagerAdapter = new DoctrineORMAdapter($qb->getQuery()); | 84 | $pagerAdapter = new DoctrineORMAdapter($qb->getQuery()); |
85 | $entries = new Pagerfanta($pagerAdapter); | 85 | $entries = new Pagerfanta($pagerAdapter); |
86 | 86 | ||
87 | $perPage = $user->getConfig()->getRssLimit() ?: $this->container->getParameter('rss_limit'); | 87 | $perPage = $user->getConfig()->getRssLimit() ?: $this->getParameter('wallabag_core.rss_limit'); |
88 | $entries->setMaxPerPage($perPage); | 88 | $entries->setMaxPerPage($perPage); |
89 | 89 | ||
90 | return $this->render('WallabagCoreBundle:Entry:entries.xml.twig', array( | 90 | return $this->render('WallabagCoreBundle:Entry:entries.xml.twig', array( |