diff options
Diffstat (limited to 'src')
3 files changed, 21 insertions, 1 deletions
diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php index 93520f9a..2e241757 100644 --- a/src/Wallabag/CoreBundle/Command/InstallCommand.php +++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php | |||
@@ -327,6 +327,16 @@ class InstallCommand extends ContainerAwareCommand | |||
327 | 'value' => '1', | 327 | 'value' => '1', |
328 | 'section' => 'analytics', | 328 | 'section' => 'analytics', |
329 | ], | 329 | ], |
330 | [ | ||
331 | 'name' => 'demo_mode_enabled', | ||
332 | 'value' => '0', | ||
333 | 'section' => 'misc', | ||
334 | ], | ||
335 | [ | ||
336 | 'name' => 'demo_mode_username', | ||
337 | 'value' => 'wallabag', | ||
338 | 'section' => 'misc', | ||
339 | ], | ||
330 | ]; | 340 | ]; |
331 | 341 | ||
332 | foreach ($settings as $setting) { | 342 | foreach ($settings as $setting) { |
diff --git a/src/Wallabag/CoreBundle/Controller/ConfigController.php b/src/Wallabag/CoreBundle/Controller/ConfigController.php index 9ff79ba9..87196b0e 100644 --- a/src/Wallabag/CoreBundle/Controller/ConfigController.php +++ b/src/Wallabag/CoreBundle/Controller/ConfigController.php | |||
@@ -57,7 +57,7 @@ class ConfigController extends Controller | |||
57 | $pwdForm->handleRequest($request); | 57 | $pwdForm->handleRequest($request); |
58 | 58 | ||
59 | if ($pwdForm->isValid()) { | 59 | if ($pwdForm->isValid()) { |
60 | if ($this->getParameter('demo') === true && $this->getParameter('demo_username') === $user->getUsername()) { | 60 | if ($this->get('craue_config')->get('demo_mode_enabled') && $this->get('craue_config')->get('demo_mode_username') === $user->getUsername()) { |
61 | $this->get('session')->getFlashBag()->add( | 61 | $this->get('session')->getFlashBag()->add( |
62 | 'notice', | 62 | 'notice', |
63 | 'In demonstration mode, you can\'t change password for this user.' | 63 | 'In demonstration mode, you can\'t change password for this user.' |
diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php index 10b60f30..1f4cafdf 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php +++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php | |||
@@ -125,6 +125,16 @@ class LoadSettingData extends AbstractFixture implements OrderedFixtureInterface | |||
125 | 'value' => '1', | 125 | 'value' => '1', |
126 | 'section' => 'analytics', | 126 | 'section' => 'analytics', |
127 | ], | 127 | ], |
128 | [ | ||
129 | 'name' => 'demo_mode_enabled', | ||
130 | 'value' => '0', | ||
131 | 'section' => 'misc', | ||
132 | ], | ||
133 | [ | ||
134 | 'name' => 'demo_mode_username', | ||
135 | 'value' => 'wallabag', | ||
136 | 'section' => 'misc', | ||
137 | ], | ||
128 | ]; | 138 | ]; |
129 | 139 | ||
130 | foreach ($settings as $setting) { | 140 | foreach ($settings as $setting) { |