Revert "[BUGFIX] requestUpdate sensitive to spaces" 11/22311/3
authorMarkus Klein <klein.t3@mfc-linz.at>
Mon, 15 Jul 2013 07:36:34 +0000 (09:36 +0200)
committerMarkus Klein <klein.t3@mfc-linz.at>
Mon, 15 Jul 2013 07:37:16 +0000 (09:37 +0200)
This reverts commit acd257b53de13b01f8e5efb4cb1e3af8a74260f4

The code has a wrong parentheses order.
Backports are fixed, only master (6.2) affected.

Releases: 6.2
Change-Id: I605730841fa8c86eb275d3d925c5a917049f386b
Reviewed-on: https://review.typo3.org/22311
Reviewed-by: Markus Klein
Tested-by: Markus Klein
typo3/sysext/backend/Classes/Form/Element/TreeElement.php

index 51c0aff..232631b 100644 (file)
@@ -140,12 +140,7 @@ class TreeElement {
                }
                // Create a JavaScript code line which will ask the user to save/update the form due to changing the element.
                // This is used for eg. "type" fields and others configured with "requestUpdate"
-               if (
-                       $GLOBALS['TCA'][$table]['ctrl']['type']
-                       && !strcmp($field, $GLOBALS['TCA'][$table]['ctrl']['type'])
-                       || $GLOBALS['TCA'][$table]['ctrl']['requestUpdate']
-                       && GeneralUtility::inList(str_replace(' ', '', $GLOBALS['TCA'][$table]['ctrl']['requestUpdate'], $field))
-               ) {
+               if ($GLOBALS['TCA'][$table]['ctrl']['type'] && !strcmp($field, $GLOBALS['TCA'][$table]['ctrl']['type']) || $GLOBALS['TCA'][$table]['ctrl']['requestUpdate'] && GeneralUtility::inList($GLOBALS['TCA'][$table]['ctrl']['requestUpdate'], $field)) {
                        if ($GLOBALS['BE_USER']->jsConfirmation(1)) {
                                $onChange .= 'if (confirm(TBE_EDITOR.labels.onChangeAlert) && ' . 'TBE_EDITOR.checkSubmit(-1)){ TBE_EDITOR.submitForm() };';
                        } else {