From 904917af86ddd7bab89711a4e0a72a0e698b9ea8 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Mon, 9 Jan 2012 14:45:24 +0000 Subject: [PATCH] API/tree: do not check parent treenodes if not expizitly selected --- phpgwapi/inc/class.html.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/phpgwapi/inc/class.html.inc.php b/phpgwapi/inc/class.html.inc.php index 0abac56c01..a0e1e2c3e8 100644 --- a/phpgwapi/inc/class.html.inc.php +++ b/phpgwapi/inc/class.html.inc.php @@ -297,6 +297,7 @@ class html { //if (!is_scalar($str) && !is_null($str)) error_log(__METHOD__.'('.array2string($str).') '.function_backtrace()); // as EGroupware supports only utf-8 we should not need to worry about wrong charsets + //if (is_array($str)) error_log(__METHOD__.__LINE__.' string expected -> array given:'.array2string($str).'->'.function_backtrace()); return htmlspecialchars($str,ENT_COMPAT,self::$charset,false); // we need '&#' unchanged, so we translate it back -> this is provided by 4th param = false -> do not doubleencode //$str = str_replace(array('&#','&nbsp;','&lt;','&gt;'),array('&#',' ','<','>'),$str); @@ -1359,7 +1360,7 @@ class html if ($_onCheckHandler && $_selected) // check selected items on multi selection { if (!is_array($_selected)) $_selected = explode(',',$_selected); - if (in_array($path,$_selected,!is_numeric($path))) $entryOptions .= ',CHECKED'; + if (array_search("$path",$_selected)!==false) $entryOptions .= ',CHECKED'; //echo "

path=$path, _selected=".print_r($_selected,true).": $entryOptions

\n"; } // highlight current item