diff --git a/etemplate/inc/class.etemplate_widget_nextmatch.inc.php b/etemplate/inc/class.etemplate_widget_nextmatch.inc.php index bbdd39092d..0322200174 100644 --- a/etemplate/inc/class.etemplate_widget_nextmatch.inc.php +++ b/etemplate/inc/class.etemplate_widget_nextmatch.inc.php @@ -171,6 +171,10 @@ class etemplate_widget_nextmatch extends etemplate_widget { self::$request = etemplate_request::read($exec_id); $value = self::get_array(self::$request->content, $form_name, true); + if(!is_array($value)) + { + $value = ($value) ? array($value) : array(); + } $value = array_merge($value, $filters); //error_log(__METHOD__."('".substr($exec_id,0,10)."...', range=".array2string($queriedRange).', filters='.array2string($filters).", '$form_name', knownUids=".array2string($knownUids).", lastModified=$lastModified) parent_id=$value[parent_id], is_parent=$value[is_parent]"); @@ -189,7 +193,7 @@ class etemplate_widget_nextmatch extends etemplate_widget // if app supports parent_id / hierarchy ($value['parent_id'] not empty), set parent_id as filter if (($parent_id = $value['parent_id'])) { - $value['col_filter']['parent_id'] = $queriedRange['parent_id']; + $value['col_filter'][$parent_id] = $queriedRange['parent_id']; } $rows = $result['data'] = $result['order'] = array(); $result['total'] = self::call_get_rows($value, $rows, $result['readonlys']); @@ -325,6 +329,7 @@ class etemplate_widget_nextmatch extends etemplate_widget } } } + if (!is_array($raw_rows)) $raw_rows = array(); if (!is_array($readonlys)) $readonlys = array(); if(is_callable($method)) // php5.2.3+ static call (value is always a var param!) { diff --git a/etemplate/js/et2_extension_nextmatch.js b/etemplate/js/et2_extension_nextmatch.js index eb76bb7710..5f105300df 100644 --- a/etemplate/js/et2_extension_nextmatch.js +++ b/etemplate/js/et2_extension_nextmatch.js @@ -621,7 +621,7 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput], { _controller, this.egw(), this.getInstanceManager().etemplate_exec_id, - "nm", + this, rowId, grid, this.rowProvider,