From 3ce3cde9165d10fffb372d6a812d1d5c96b1868f Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 13 Jan 2010 06:31:52 +0000 Subject: [PATCH] fixed in wrong order displayed sub-categories --- etemplate/inc/class.select_widget.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/etemplate/inc/class.select_widget.inc.php b/etemplate/inc/class.select_widget.inc.php index b1e40529dd..7973ba9cb4 100644 --- a/etemplate/inc/class.select_widget.inc.php +++ b/etemplate/inc/class.select_widget.inc.php @@ -187,7 +187,8 @@ class select_widget { $categories = new categories('',$type3); } - foreach((array)$categories->return_sorted_array(0,False,'','','',!$type,$type4) as $cat) + // we cast $type4 (parent) to int, to get default of 0 if omitted + foreach((array)$categories->return_sorted_array(0,False,'','','',!$type,(int)$type4) as $cat) { $s = str_repeat(' ',$cat['level']) . stripslashes($cat['name']);