From 74ffa874bdcf3ae1cb2ccebb2bd3126e05be68ce Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 22 Sep 2002 18:10:06 +0000 Subject: [PATCH] fix to jump back to the start, if search returns less items than acutal position is --- etemplate/inc/class.nextmatch_widget.inc.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/etemplate/inc/class.nextmatch_widget.inc.php b/etemplate/inc/class.nextmatch_widget.inc.php index f40890eb7a..5f49f50d80 100644 --- a/etemplate/inc/class.nextmatch_widget.inc.php +++ b/etemplate/inc/class.nextmatch_widget.inc.php @@ -40,6 +40,11 @@ if ($do_get_rows) { $value['rows'] = ExecMethod($value['get_rows'],$value); + if ($value['start'] > $value['rows'][0]) + { + $value['start'] = 0; + $value['rows'] = ExecMethod($value['get_rows'],$value); + } $GLOBALS['phpgw_info']['etemplate']['extension_data']['nextmatch_widget'][$cell['name']]['total'] = $value['rows'][0]; } if ($cell['size'])