From d3d47af015e4a1d0d05c5776f1da42f57363efce Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Fri, 23 Jan 2009 19:33:19 +0000 Subject: [PATCH] Fix bug where if there are multiple nextmatches on a page, and your default num_rows is not in the list (ex: 15), and you cause a nextmatch to submit (by changing a filter or num_rows), the num_rows of the next nextmatch to be processed will be cleared --- etemplate/inc/class.nextmatch_widget.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/etemplate/inc/class.nextmatch_widget.inc.php b/etemplate/inc/class.nextmatch_widget.inc.php index 4e5e7d64bd..d7e5311ea1 100644 --- a/etemplate/inc/class.nextmatch_widget.inc.php +++ b/etemplate/inc/class.nextmatch_widget.inc.php @@ -292,9 +292,10 @@ class nextmatch_widget if ($n-5 <= $max && $max <= $n+5) $n = $max; $row_options[$n] = $n; } - if (!isset($row_options[$max])) + if (!isset($row_options[$max]) || !isset($row_options[$value['num_rows']])) { $row_options[$max] = $max; + $row_options[$value['num_rows']] = $value['num_rows']; ksort($row_options); } $value['options-num_rows'] =& $row_options;