Fixed bug #10179: sys_action menu doesn't respect hidden and returns empty ul if...
authorSteffen Kamper <info@sk-typo3.de>
Fri, 23 Jan 2009 18:54:23 +0000 (18:54 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Fri, 23 Jan 2009 18:54:23 +0000 (18:54 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@4828 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/sys_action/toolbarmenu/class.tx_sysaction_toolbarmenu.php

index 95878b8..253c3ff 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-01-23  Steffen Kamper  <info@sk-typo3.de>
+
+       * Fixed bug #10179: sys_action menu doesn't respect hidden and returns empty ul if there are no entries
+
 2009-01-23  Michael Stucki  <michael@typo3.org>
 
        * Fixed bug #10231: split() is deprecated in PHP 5.3 (patch by Karsten Dambekalns)
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
+?>