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

This commit is contained in:
Nathan Gray 2009-01-23 19:33:19 +00:00
parent 4c5d771cde
commit d3d47af015

View File

@ -292,9 +292,10 @@ class nextmatch_widget
if ($n-5 <= $max && $max <= $n+5) $n = $max; if ($n-5 <= $max && $max <= $n+5) $n = $max;
$row_options[$n] = $n; $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[$max] = $max;
$row_options[$value['num_rows']] = $value['num_rows'];
ksort($row_options); ksort($row_options);
} }
$value['options-num_rows'] =& $row_options; $value['options-num_rows'] =& $row_options;