[BUGFIX] One func wizard installed shows "Select wizard" without selectbox 51/32651/3
authorWouter Wolters <typo3@wouterwolters.nl>
Mon, 8 Sep 2014 16:56:33 +0000 (18:56 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Mon, 8 Sep 2014 20:22:19 +0000 (22:22 +0200)
With one func wizard installed the text "Select wizard" is shown
without a selectbox. Hide the text if no func menu is available.

Resolves: #61452
Releases: 6.3
Change-Id: Iafb24bc2dcbf9b09b13939d7a8c5217ce94b43f0
Reviewed-on: http://review.typo3.org/32651
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/func_wizards/Classes/Controller/WebFunctionWizardsBaseController.php

index d7c5e8a..b046b87 100644 (file)
@@ -71,17 +71,20 @@ class WebFunctionWizardsBaseController extends \TYPO3\CMS\Backend\Module\Abstrac
         * @todo Define visibility
         */
        public function main() {
-               global $SOBE, $LANG;
-               $menu = $LANG->getLL('wiz_lWizards', TRUE) . ': ' . \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu(
+               $menu = \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu(
                        $this->pObj->id,
                        'SET[wiz]',
                        $this->pObj->MOD_SETTINGS['wiz'],
                        $this->pObj->MOD_MENU['wiz']
                );
-               $theOutput .= $this->pObj->doc->section('', '<span class="nobr">' . $menu . '</span>');
+
                $content = '';
-               $content .= $theOutput;
-               $content .= $this->pObj->doc->spacer(20);
+               if (!empty($menu)) {
+                       $menu = $GLOBALS['LANG']->getLL('wiz_lWizards', TRUE) . ': ' . $menu;
+                       $content = $this->pObj->doc->section('', '<span class="nobr">' . $menu . '</span>');
+                       $content .= $this->pObj->doc->spacer(20);
+               }
+
                $content .= $this->extObjContent();
                return $content;
        }