[TASK] Allow type 'check' in site configuration 83/59683/4
authorJulian Wundrak <julian@wundrak.net>
Mon, 11 Feb 2019 20:42:51 +0000 (21:42 +0100)
committerGeorg Ringer <georg.ringer@gmail.com>
Thu, 14 Feb 2019 12:35:59 +0000 (13:35 +0100)
Add check option to site-config tca for something like active or
maintenance mode
Resolves: #87692
Releases: master, 9.5
Change-Id: Idaa09a5929db5bdf177e57c5f78f827047705f91
Reviewed-on: https://review.typo3.org/59683
Tested-by: TYPO3com <noreply@typo3.com>
Reviewed-by: Daniel Goerz <daniel.goerz@posteo.de>
Reviewed-by: André Schließer <andy.schliesser@gmail.com>
Tested-by: André Schließer <andy.schliesser@gmail.com>
Reviewed-by: Jörg Bösche <typo3@joergboesche.de>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
typo3/sysext/backend/Classes/Controller/SiteConfigurationController.php

index c06c418..aeea35f 100644 (file)
@@ -304,6 +304,10 @@ class SiteConfigurationController
                         $newSysSiteData[$fieldName] = MathUtility::canBeInterpretedAsInteger($fieldValue) ? (int)$fieldValue : $fieldValue;
                         break;
 
+                    case 'check':
+                        $newSysSiteData[$fieldName] = (bool)$fieldValue;
+                        break;
+
                     default:
                         throw new \RuntimeException('TCA type "' . $type . '" is not implemented in site handling', 1521032781);
                 }