summaryrefslogtreecommitdiff
path: root/app/Module/ResearchTaskModule.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Module/ResearchTaskModule.php')
-rw-r--r--app/Module/ResearchTaskModule.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/app/Module/ResearchTaskModule.php b/app/Module/ResearchTaskModule.php
index 2fbf4c8d32..3044e00506 100644
--- a/app/Module/ResearchTaskModule.php
+++ b/app/Module/ResearchTaskModule.php
@@ -29,6 +29,7 @@ use Fisharebest\Webtrees\I18N;
use Fisharebest\Webtrees\Individual;
use Fisharebest\Webtrees\Registry;
use Fisharebest\Webtrees\Tree;
+use Fisharebest\Webtrees\Validator;
use Illuminate\Database\Capsule\Manager as DB;
use Illuminate\Database\Query\JoinClause;
use Illuminate\Support\Collection;
@@ -249,11 +250,13 @@ class ResearchTaskModule extends AbstractModule implements ModuleBlockInterface
*/
public function saveBlockConfiguration(ServerRequestInterface $request, int $block_id): void
{
- $params = (array) $request->getParsedBody();
+ $show_other = Validator::parsedBody($request)->boolean('show_other', false);
+ $show_unassigned = Validator::parsedBody($request)->boolean('show_unassigned', false);
+ $show_future = Validator::parsedBody($request)->boolean('show_future', false);
- $this->setBlockSetting($block_id, 'show_other', $params['show_other']);
- $this->setBlockSetting($block_id, 'show_unassigned', $params['show_unassigned']);
- $this->setBlockSetting($block_id, 'show_future', $params['show_future']);
+ $this->setBlockSetting($block_id, 'show_other', (string) $show_other);
+ $this->setBlockSetting($block_id, 'show_unassigned', (string) $show_unassigned);
+ $this->setBlockSetting($block_id, 'show_future', (string) $show_future);
}
/**