Index: perl-CGI-FormMagick/perl-CGI-FormMagick.spec diff -u perl-CGI-FormMagick/lib/CGI/FormMagick.pm:1.15 perl-CGI-FormMagick/lib/CGI/FormMagick.pm:1.16 --- perl-CGI-FormMagick/lib/CGI/FormMagick.pm:1.15 Tue Jul 13 17:29:06 2004 +++ perl-CGI-FormMagick/lib/CGI/FormMagick.pm Tue Jul 13 18:00:32 2004 @@ -867,29 +867,32 @@ return $self->{cgi}->param("wherenext"); } -=head2 novalidate +=head2 nopost Often, you want to provide the ability to navigate to a new page without validating the last page. When that is the case, you should set the -'novalidate' CGI param, which is checked with this method, and then deleted to +'nopost' CGI param, which is checked with this method, and then deleted to prevent is being remembered for the next submission. =begin testing -$cgi = CGI->new({ novalidate => "foo" }); +$cgi = CGI->new({ nopost => "foo" }); local $fm->{cgi} = $cgi; -is($fm->novalidate(), 1, "novalidate CGI param is set"); +is($fm->nopost(), 1, "nopost CGI param is set"); =end testing =cut -sub novalidate +sub nopost { my $self = shift; - my $novalidate = $self->{cgi}->param("novalidate") ? 1 : 0; - $self->{cgi}->delete("novalidate") if $novalidate; - return $novalidate; + my $nopost = $self->{cgi}->param("nopost") ? 1 : 0; + $self->{cgi}->delete("nopost") if $nopost; + my ($package, $filename, $line) = caller; + $self->debug_msg("The nopost param is $nopost"); + $self->debug_msg("caller was = $package, $filename, $line"); + return $nopost; } =head2 prepare_for_next_page @@ -953,12 +956,12 @@ sub prepare_for_next_page { my ($self) = @_; - $self->validate_page($self->{page_number}) - unless $self->novalidate(); + my $nopost = $self->nopost(); + $self->validate_page($self->{page_number}) unless $nopost; unless ($self->errors()) { # ONLY do the page post event if the form passes validation - $self->page_post_event(); + $self->page_post_event() unless $nopost; $self->push_page_stack($self->{page_number}); if ($self->magic_wherenext()) {