diff options
-rw-r--r-- | app/config/parameters.yml.dist | 4 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Command/InstallCommand.php | 9 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Controller/ConfigController.php | 8 |
3 files changed, 15 insertions, 6 deletions
diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist index e936911c..258a585f 100644 --- a/app/config/parameters.yml.dist +++ b/app/config/parameters.yml.dist | |||
@@ -37,5 +37,7 @@ parameters: | |||
37 | export_mobi: true | 37 | export_mobi: true |
38 | export_pdf: true | 38 | export_pdf: true |
39 | 39 | ||
40 | # List view | 40 | # default user config |
41 | items_on_page: 12 | 41 | items_on_page: 12 |
42 | theme: baggy | ||
43 | language: en_US | ||
diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php index a4301958..c1b72604 100644 --- a/src/Wallabag/CoreBundle/Command/InstallCommand.php +++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php | |||
@@ -135,11 +135,10 @@ class InstallCommand extends ContainerAwareCommand | |||
135 | 135 | ||
136 | $em->persist($user); | 136 | $em->persist($user); |
137 | 137 | ||
138 | $config = new Config(); | 138 | $config = new Config($user); |
139 | $config->setUser($user); | 139 | $config->setTheme($this->getContainer()->getParameter('theme')); |
140 | $config->setTheme('baggy'); | 140 | $config->setItemsPerPage($this->getContainer()->getParameter('items_on_page')); |
141 | $config->setItemsPerPage(10); | 141 | $config->setLanguage($this->getContainer()->getParameter('language')); |
142 | $config->setLanguage('en_US'); | ||
143 | 142 | ||
144 | $em->persist($config); | 143 | $em->persist($config); |
145 | } | 144 | } |
diff --git a/src/Wallabag/CoreBundle/Controller/ConfigController.php b/src/Wallabag/CoreBundle/Controller/ConfigController.php index aedbc999..68e034fa 100644 --- a/src/Wallabag/CoreBundle/Controller/ConfigController.php +++ b/src/Wallabag/CoreBundle/Controller/ConfigController.php | |||
@@ -81,6 +81,14 @@ class ConfigController extends Controller | |||
81 | 81 | ||
82 | if ($newUserForm->isValid()) { | 82 | if ($newUserForm->isValid()) { |
83 | $em->persist($newUser); | 83 | $em->persist($newUser); |
84 | |||
85 | $config = new Config($newUser); | ||
86 | $config->setTheme($this->container->getParameter('theme')); | ||
87 | $config->setItemsPerPage($this->container->getParameter('items_on_page')); | ||
88 | $config->setLanguage($this->container->getParameter('language')); | ||
89 | |||
90 | $em->persist($config); | ||
91 | |||
84 | $em->flush(); | 92 | $em->flush(); |
85 | 93 | ||
86 | $this->get('session')->getFlashBag()->add( | 94 | $this->get('session')->getFlashBag()->add( |