[BUGFIX] Hide empty settings in user settings 26/35026/2
authorMarkus Klein <klein.t3@reelworx.at>
Thu, 4 Dec 2014 10:43:28 +0000 (11:43 +0100)
committerMarkus Klein <klein.t3@reelworx.at>
Thu, 4 Dec 2014 11:09:22 +0000 (12:09 +0100)
This ensures normal users do not see the "Admin functions" tab.

Releases: #63558
Resolves: 6.2
Change-Id: Ieee76e86ff35d7b8ffd64edbb004075d621e3b27
Reviewed-on: http://review.typo3.org/35026
Reviewed-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
Tested-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
Reviewed-by: Cedric Ziel <cedric@cedric-ziel.com>
Tested-by: Cedric Ziel <cedric@cedric-ziel.com>
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
typo3/sysext/setup/Classes/Controller/SetupModuleController.php

index d4bb248..963809a 100644 (file)
@@ -522,6 +522,7 @@ class SetupModuleController {
                                $html = GeneralUtility::callUserFunction($config['userFunc'], $config, $this, '');
                                break;
                        case 'button':
+                               $html = '';
                                if ($config['onClick']) {
                                        $onClick = $config['onClick'];
                                        if ($config['onClickLabels']) {
@@ -536,8 +537,10 @@ class SetupModuleController {
                        default:
                                $html = '';
                        }
-                       $code[$i][1] = $label;
-                       $code[$i++][2] = $html;
+                       if ($html) {
+                               $code[$i][1] = $label;
+                               $code[$i++][2] = $html;
+                       }
                }
                if ($this->dividers2tabs == 0) {
                        $tabLabel = $firstTabLabel;