From 0d05a9ce404c13caf3b922923666452300cf004b Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 4 Jun 2010 20:06:41 +0000 Subject: [PATCH] allow to call html::tree(null,null) to get just the javascript, eg. to include it in header --- phpgwapi/inc/class.html.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpgwapi/inc/class.html.inc.php b/phpgwapi/inc/class.html.inc.php index 820098ba0d..f4584ed026 100644 --- a/phpgwapi/inc/class.html.inc.php +++ b/phpgwapi/inc/class.html.inc.php @@ -1292,8 +1292,6 @@ class html $folderImageDir = $GLOBALS['egw_info']['server']['webserver_url'].'/phpgwapi/templates/default/images/'; } - $html = self::div("\n",'id="'.$tree.'"',$_divClass); - static $tree_initialised=false; if (!$tree_initialised) { @@ -1301,7 +1299,9 @@ class html $html .= "\n"; $html .= "\n"; $tree_initialised = true; + if (!$_folders) return $html; } + $html = self::div("\n",'id="'.$tree.'"',$_divClass).$html; $html .= "