From 0d62311485d030411fa545f5a930294dcf5aec13 Mon Sep 17 00:00:00 2001 From: Roy Johnson Date: Sun, 23 Apr 2006 01:30:56 +0000 Subject: [PATCH] Fixed the pagination bug... woo hoo! --- lib/WebGUI/Asset/Wobject/EventManagementSystem.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/WebGUI/Asset/Wobject/EventManagementSystem.pm b/lib/WebGUI/Asset/Wobject/EventManagementSystem.pm index a8db549cd..7b1da9f9f 100644 --- a/lib/WebGUI/Asset/Wobject/EventManagementSystem.pm +++ b/lib/WebGUI/Asset/Wobject/EventManagementSystem.pm @@ -2681,8 +2681,10 @@ sub www_search { $var{'search.formSubmit'} = WebGUI::Form::submit($self->session, {name=>"filter",value=>$i18n->get('filter')}); my $searchUrl = $self->getUrl("a=1"); #a=1 is a hack to get the ? appended to the url in the right place. This param/value does nothing. my $formVars = $self->session->form->paramsHashRef(); + my @paramsUsed; foreach ($self->session->form->param) { - $searchUrl .= ';'.$_.'='.$formVars->{$_} if (($_ ne 'pn') && ($formVars->{$_} || $formVars->{$_} eq '0')); + $searchUrl .= ';'.$_.'='.$formVars->{$_} if (($_ ne 'pn') && ($formVars->{$_} || $formVars->{$_} eq '0') && !isIn(@paramsUsed, $_) && $_ ne "a"); + push (@paramsUsed, $_); } my $p = WebGUI::Paginator->new($self->session,$searchUrl,$self->get("paginateAfter")); my (@results, $sth, $data);