From 60c4c33e8cdec0cf8489f84867173fb3a8eb3abe Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 14 May 2012 16:46:52 +0000 Subject: [PATCH] Allow non-row data in rows (sel_options) even if there are no results --- etemplate/inc/class.etemplate_widget_nextmatch.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etemplate/inc/class.etemplate_widget_nextmatch.inc.php b/etemplate/inc/class.etemplate_widget_nextmatch.inc.php index 6bbad6f2a3..fb5e7e8c4b 100644 --- a/etemplate/inc/class.etemplate_widget_nextmatch.inc.php +++ b/etemplate/inc/class.etemplate_widget_nextmatch.inc.php @@ -160,7 +160,7 @@ class etemplate_widget_nextmatch extends etemplate_widget self::$request = etemplate_request::read($exec_id); $value = self::get_array(self::$request->content, $form_name, true); $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]"); + //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]"); $result = array(); @@ -337,7 +337,7 @@ class etemplate_widget_nextmatch extends etemplate_widget if ($total > 200) @set_time_limit(0); // remove empty rows required by old etemplate to compensate for header rows - $first = null; + $first = $total ? null : 0; foreach($raw_rows as $n => $row) { // skip empty rows inserted for each header-line in old etemplate