Fixed bug #10179: sys_action menu doesn't respect hidden and returns empty ul if...
[Packages/TYPO3.CMS.git] / typo3 / sysext / sys_action / toolbarmenu / class.tx_sysaction_toolbarmenu.php
index d1e64b9..2d3b227 100644 (file)
@@ -94,9 +94,12 @@ class tx_sysactionToolbarMenu implements backend_toolbarItem {
                        }
 
                        $actionMenu[] = '</ul>';
+                       return implode("\n", $actionMenu);
+               } else {
+                       return '';
                }
 
-               return implode("\n", $actionMenu);
+               
        }
 
        /**
@@ -113,7 +116,7 @@ class tx_sysactionToolbarMenu implements backend_toolbarItem {
                        $queryResource = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
                                '*',
                                'sys_action',
-                               'sys_action.pid = 0',
+                               'pid = 0 AND hidden=0',
                                '',
                                'sys_action.sorting'
                        );
@@ -204,4 +207,4 @@ if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/sys_act
        include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/sys_action/toolbarmenu/class.tx_sysaction_toolbarmenu.php']);
 }
 
-?>
\ No newline at end of file
+?>