From 4648c5025e50a0c1e342f1902b6dbda9b142f519 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cornelius=20Wei=C3=9F?= Date: Tue, 10 Oct 2006 15:10:07 +0000 Subject: [PATCH] don't set items witch are not submitted from UA in content array on callback. This is usefull if u want to process just subsets of a form e.g. by xajax --- etemplate/inc/class.boetemplate.inc.php | 3 ++- etemplate/inc/class.uietemplate.inc.php | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/etemplate/inc/class.boetemplate.inc.php b/etemplate/inc/class.boetemplate.inc.php index ca3acf48cb..75a7011ee0 100644 --- a/etemplate/inc/class.boetemplate.inc.php +++ b/etemplate/inc/class.boetemplate.inc.php @@ -634,11 +634,12 @@ { return False; } + if(!isset($pos[$idx])) return false; $pos = &$pos[$idx]; } return $pos; } - + /** * unsets $arr[$idx] * diff --git a/etemplate/inc/class.uietemplate.inc.php b/etemplate/inc/class.uietemplate.inc.php index bd17741479..c1b758ec98 100644 --- a/etemplate/inc/class.uietemplate.inc.php +++ b/etemplate/inc/class.uietemplate.inc.php @@ -1664,7 +1664,7 @@ } $GLOBALS['egw_info']['etemplate']['validation_errors'] = array(); $this->canceled = $this->button_pressed = False; - + foreach($to_process as $form_name => $type) { if (is_array($type)) @@ -1677,7 +1677,8 @@ $attr = array(); } $value = $this->get_array($content_in,$form_name,True); - + if($value === false) continue; + if (isset($attr['blur']) && $attr['blur'] == $value) { $value = ''; // blur-values is equal to emtpy