From ffd9fec8c8e11a5e5a90a722396f5336dfbde538 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cornelius=20Wei=C3=9F?= Date: Mon, 7 Nov 2005 23:09:49 +0000 Subject: [PATCH] fix: searching in customfields of type select was not working fix: hadle search actions if they are no button --- .../inc/class.advancedsearch_widget.inc.php | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/etemplate/inc/class.advancedsearch_widget.inc.php b/etemplate/inc/class.advancedsearch_widget.inc.php index 1fd5a5220a..33ae91b442 100644 --- a/etemplate/inc/class.advancedsearch_widget.inc.php +++ b/etemplate/inc/class.advancedsearch_widget.inc.php @@ -195,17 +195,23 @@ } $extension_data['result_nm']['search_values'] = $value; } - elseif(isset($value['action'])) - { - $result = $GLOBALS['egw']->session->appsession('advanced_search_result','etemplate'); - _debug_array($result); - $extension_data['msg'] = ExecMethod2($extension_data['actions'][key($value['action'])]['method'],$result); - } else { $extension_data['result_nm'] = array_merge($extension_data['result_nm'],$value['result_nm']); } - } + + if(isset($value['action'])) + { + // Also inputfileds etc. could be in actions + foreach($value['action'] as $action => $label) + { + if($extension_data['actions'][$action]['type'] == 'button') + { + $result = $GLOBALS['egw']->session->appsession('advanced_search_result','etemplate'); + $extension_data['msg'] = ExecMethod2($extension_data['actions'][key($value['action'])]['method'],$result); + } + } + } } function get_rows($query,&$rows,&$readonlys) {