fixed in wrong order displayed sub-categories

This commit is contained in:
Ralf Becker 2010-01-13 06:31:52 +00:00
parent 6bf3be83fc
commit 3ce3cde916

View File

@ -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']);