[BUGFIX] EXT:form - do not wrap in anonymous function 54/52154/2
authorBenni Mack <benni@typo3.org>
Sat, 25 Mar 2017 17:07:43 +0000 (18:07 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 25 Mar 2017 21:56:43 +0000 (22:56 +0100)
There are no local variables in ext_tables.php that would
justify having a call_user_func() wrap around the
registration of the Form module.

Resolves: #80441
Releases: master
Change-Id: Idd927141ca10c22fcf43b0c553b82518925995cd
Reviewed-on: https://review.typo3.org/52154
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Patrick Broens <patrick@patrickbroens.nl>
Tested-by: Patrick Broens <patrick@patrickbroens.nl>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/form/ext_tables.php

index aae73d7..65a4f30 100644 (file)
@@ -1,25 +1,23 @@
 <?php
 defined('TYPO3_MODE') or die();
 
-call_user_func(function () {
-    if (TYPO3_MODE === 'BE') {
-        // Register the backend module Web->Forms
-        \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
-            'TYPO3.CMS.Form',
-            'web',
-            'formbuilder',
-            '',
-            [
-                'FormManager' => 'index, show, create, duplicate, references, delete',
-                'FormEditor' => 'index, saveForm, renderFormPage, renderRenderableOptions',
-            ],
-            [
-                'access' => 'user,group',
-                'icon' => 'EXT:form/Resources/Public/Icons/Extension.png',
-                'labels' => 'LLL:EXT:form/Resources/Private/Language/locallang_module.xlf',
-                'navigationComponentId' => '',
-                'inheritNavigationComponentFromMainModule' => false
-            ]
-        );
-    }
-});
+if (TYPO3_MODE === 'BE') {
+    // Register the backend module Web->Forms
+    \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
+        'TYPO3.CMS.Form',
+        'web',
+        'formbuilder',
+        '',
+        [
+            'FormManager' => 'index, show, create, duplicate, references, delete',
+            'FormEditor' => 'index, saveForm, renderFormPage, renderRenderableOptions',
+        ],
+        [
+            'access' => 'user,group',
+            'icon' => 'EXT:form/Resources/Public/Icons/Extension.png',
+            'labels' => 'LLL:EXT:form/Resources/Private/Language/locallang_module.xlf',
+            'navigationComponentId' => '',
+            'inheritNavigationComponentFromMainModule' => false
+        ]
+    );
+}