From 653bdc9658e4a3fc4cb5eeae9036ef3fa8df2cfd Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 16 Oct 2002 15:22:06 +0000 Subject: [PATCH] - no empty data-line shown, if no data - added option to disable nextmatch, if total entries <= nextmatch-max and no search, filter or cat set --- etemplate/inc/class.nextmatch_widget.inc.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/etemplate/inc/class.nextmatch_widget.inc.php b/etemplate/inc/class.nextmatch_widget.inc.php index 8dfcad092a..24cb270b3f 100644 --- a/etemplate/inc/class.nextmatch_widget.inc.php +++ b/etemplate/inc/class.nextmatch_widget.inc.php @@ -118,7 +118,10 @@ $max = $GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs']; $loop = False; - if (is_array($value) && ($value['start_search'] || $value['cat_id'] != $old_value['cat_id'] || + $is_array_value = is_array($value); + $value['start'] = $old_value['start']; // need to be set, to be reported back + + if ($is_array_value && ($value['start_search'] || $value['cat_id'] != $old_value['cat_id'] || $old_value['filter'] != '' && $value['filter'] != $old_value['filter'] || $old_value['filter2'] != '' && $value['filter2'] != $old_value['filter2'])) { @@ -148,8 +151,6 @@ $value['start'] = (int) (($old_value['total']-2) / $max) * $max; $loop = True; } - $value['start'] = $old_value['start']; // need to be set, to be reported back - return True; } }