From d0a7a9aaf414f27b77ee07f00007f4979071f99a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cornelius=20Wei=C3=9F?= Date: Tue, 10 Oct 2006 18:03:27 +0000 Subject: [PATCH] fix: etemplate does not like my previous patch, don't know why :-( --- etemplate/inc/class.boetemplate.inc.php | 5 +++-- etemplate/inc/class.uietemplate.inc.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/etemplate/inc/class.boetemplate.inc.php b/etemplate/inc/class.boetemplate.inc.php index 75a7011ee0..a3b0a660be 100644 --- a/etemplate/inc/class.boetemplate.inc.php +++ b/etemplate/inc/class.boetemplate.inc.php @@ -618,9 +618,10 @@ * @param array $arr the array to search, referenz as a referenz gets returned * @param string $idx the index, may contain sub-indices like a[b], see example below * @param boolean $reference_into default False, if True none-existing sub-arrays/-indices get created to be returned as referenz, else False is returned + * @param bool $skip_empty returns false if $idx is not present in $arr * @return mixed reference to $arr[$idx] or false if $idx is not set and not $reference_into */ - function &get_array(&$arr,$idx,$reference_into=False) + function &get_array(&$arr,$idx,$reference_into=False,$skip_empty=False) { if (!is_array($arr)) { @@ -634,7 +635,7 @@ { return False; } - if(!isset($pos[$idx])) return false; + if($skip_empty && !isset($pos[$idx])) return false; $pos = &$pos[$idx]; } return $pos; diff --git a/etemplate/inc/class.uietemplate.inc.php b/etemplate/inc/class.uietemplate.inc.php index c1b758ec98..60fb18f5e8 100644 --- a/etemplate/inc/class.uietemplate.inc.php +++ b/etemplate/inc/class.uietemplate.inc.php @@ -1676,7 +1676,7 @@ { $attr = array(); } - $value = $this->get_array($content_in,$form_name,True); + $value = $this->get_array($content_in,$form_name,True,$GLOBALS['egw_info']['flags']['currentapp'] == 'etemplate' ? false : true ); if($value === false) continue; if (isset($attr['blur']) && $attr['blur'] == $value)