diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Controller/ConfigController.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Controller/ConfigController.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/ConfigController.php b/src/Wallabag/CoreBundle/Controller/ConfigController.php index 68f30f6e..907bf78e 100644 --- a/src/Wallabag/CoreBundle/Controller/ConfigController.php +++ b/src/Wallabag/CoreBundle/Controller/ConfigController.php | |||
@@ -35,7 +35,7 @@ class ConfigController extends Controller | |||
35 | $configForm = $this->createForm(ConfigType::class, $config, ['action' => $this->generateUrl('config')]); | 35 | $configForm = $this->createForm(ConfigType::class, $config, ['action' => $this->generateUrl('config')]); |
36 | $configForm->handleRequest($request); | 36 | $configForm->handleRequest($request); |
37 | 37 | ||
38 | if ($configForm->isValid()) { | 38 | if ($configForm->isSubmitted() && $configForm->isValid()) { |
39 | $em->persist($config); | 39 | $em->persist($config); |
40 | $em->flush(); | 40 | $em->flush(); |
41 | 41 | ||
@@ -57,7 +57,7 @@ class ConfigController extends Controller | |||
57 | $pwdForm = $this->createForm(ChangePasswordType::class, null, ['action' => $this->generateUrl('config').'#set4']); | 57 | $pwdForm = $this->createForm(ChangePasswordType::class, null, ['action' => $this->generateUrl('config').'#set4']); |
58 | $pwdForm->handleRequest($request); | 58 | $pwdForm->handleRequest($request); |
59 | 59 | ||
60 | if ($pwdForm->isValid()) { | 60 | if ($pwdForm->isSubmitted() && $pwdForm->isValid()) { |
61 | if ($this->get('craue_config')->get('demo_mode_enabled') && $this->get('craue_config')->get('demo_mode_username') === $user->getUsername()) { | 61 | if ($this->get('craue_config')->get('demo_mode_enabled') && $this->get('craue_config')->get('demo_mode_username') === $user->getUsername()) { |
62 | $message = 'flashes.config.notice.password_not_updated_demo'; | 62 | $message = 'flashes.config.notice.password_not_updated_demo'; |
63 | } else { | 63 | } else { |
@@ -79,7 +79,7 @@ class ConfigController extends Controller | |||
79 | ]); | 79 | ]); |
80 | $userForm->handleRequest($request); | 80 | $userForm->handleRequest($request); |
81 | 81 | ||
82 | if ($userForm->isValid()) { | 82 | if ($userForm->isSubmitted() && $userForm->isValid()) { |
83 | $userManager->updateUser($user, true); | 83 | $userManager->updateUser($user, true); |
84 | 84 | ||
85 | $this->get('session')->getFlashBag()->add( | 85 | $this->get('session')->getFlashBag()->add( |
@@ -94,7 +94,7 @@ class ConfigController extends Controller | |||
94 | $rssForm = $this->createForm(RssType::class, $config, ['action' => $this->generateUrl('config').'#set2']); | 94 | $rssForm = $this->createForm(RssType::class, $config, ['action' => $this->generateUrl('config').'#set2']); |
95 | $rssForm->handleRequest($request); | 95 | $rssForm->handleRequest($request); |
96 | 96 | ||
97 | if ($rssForm->isValid()) { | 97 | if ($rssForm->isSubmitted() && $rssForm->isValid()) { |
98 | $em->persist($config); | 98 | $em->persist($config); |
99 | $em->flush(); | 99 | $em->flush(); |
100 | 100 | ||
@@ -125,7 +125,7 @@ class ConfigController extends Controller | |||
125 | $newTaggingRule = $this->createForm(TaggingRuleType::class, $taggingRule, ['action' => $action]); | 125 | $newTaggingRule = $this->createForm(TaggingRuleType::class, $taggingRule, ['action' => $action]); |
126 | $newTaggingRule->handleRequest($request); | 126 | $newTaggingRule->handleRequest($request); |
127 | 127 | ||
128 | if ($newTaggingRule->isValid()) { | 128 | if ($newTaggingRule->isSubmitted() && $newTaggingRule->isValid()) { |
129 | $taggingRule->setConfig($config); | 129 | $taggingRule->setConfig($config); |
130 | $em->persist($taggingRule); | 130 | $em->persist($taggingRule); |
131 | $em->flush(); | 131 | $em->flush(); |