diff --git a/inc/html.php b/inc/html.php index 7f5a46b933..1658e9b4c6 100644 --- a/inc/html.php +++ b/inc/html.php @@ -899,7 +899,7 @@ function html_li_default($item){ * * @author Andreas Gohr */ -function html_buildlist($data,$class,$func,$lifunc='html_li_default'){ +function html_buildlist($data,$class,$func,$lifunc='html_li_default',$forcewrapper=false){ if (count($data) === 0) { return ''; } @@ -907,7 +907,7 @@ function html_buildlist($data,$class,$func,$lifunc='html_li_default'){ $start_level = $data[0]['level']; $ret = ''; - if ($start_level < 2) { + if ($forcewrapper || $start_level < 2) { // Trigger building a wrapper ul if the first level is // 0 (we have a root object) or 1 (just the root content) --$start_level; @@ -930,8 +930,9 @@ function html_buildlist($data,$class,$func,$lifunc='html_li_default'){ //close higher lists $ret .= "\n\n"; } + $ret .= "