diff --git a/etemplate/inc/class.etemplate_widget_menupopup.inc.php b/etemplate/inc/class.etemplate_widget_menupopup.inc.php index a98fa1ca7f..2547a91f04 100644 --- a/etemplate/inc/class.etemplate_widget_menupopup.inc.php +++ b/etemplate/inc/class.etemplate_widget_menupopup.inc.php @@ -276,8 +276,10 @@ class etemplate_widget_menupopup extends etemplate_widget { $categories = new categories($type5,$type3); } + // Allow text for global + $type = ($type && strlen($type) > 1 ? $type : !$type); // we cast $type4 (parent) to int, to get default of 0 if omitted - foreach((array)$categories->return_sorted_array(0,False,'','','',!$type,(int)$type4,true) as $cat) + foreach((array)$categories->return_sorted_array(0,False,'','','',$type,(int)$type4,true) as $cat) { $s = str_repeat(' ',$cat['level']) . stripslashes($cat['name']);