[BUGFIX] Remove singleton for EXT:form Localization
[Packages/TYPO3.CMS.git] / typo3 / sysext / form / Classes / Controller / FormController.php
index 435f1d8..d4acd61 100644 (file)
@@ -68,7 +68,6 @@ class FormController {
         * @return void
         */
        public function initialize(array $typoscript) {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Form\\Localization', 'LLL:EXT:form/Resources/Private/Language/locallang_controller.xml');
                $this->typoscriptFactory = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Form\\Domain\\Factory\\TypoScriptFactory');
                $this->localizationHandler = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Form\\Localization');
                $this->requestHandler = $this->typoscriptFactory->setRequestHandler($typoscript);
@@ -150,7 +149,7 @@ class FormController {
        protected function showForm() {
                $show = FALSE;
                $submittedByPrefix = $this->requestHandler->getByMethod();
-               if (($submittedByPrefix === NULL || !empty($submittedByPrefix) && !$this->validate->isValid()) || (!empty($submittedByPrefix) && $this->validate->isValid()) && $this->requestHandler->getPost('confirmation-false', NULL) !== NULL) {
+               if ($submittedByPrefix === NULL || !empty($submittedByPrefix) && !$this->validate->isValid() || !empty($submittedByPrefix) && $this->validate->isValid() && $this->requestHandler->getPost('confirmation-false', NULL) !== NULL) {
                        $show = TRUE;
                }
                return $show;
@@ -181,7 +180,7 @@ class FormController {
         */
        protected function showConfirmation() {
                $show = FALSE;
-               if ((isset($this->typoscript['confirmation']) && $this->typoscript['confirmation'] == 1) && $this->requestHandler->getPost('confirmation-true', NULL) === NULL) {
+               if (isset($this->typoscript['confirmation']) && $this->typoscript['confirmation'] == 1 && $this->requestHandler->getPost('confirmation-true', NULL) === NULL) {
                        $show = TRUE;
                }
                return $show;