[PATCH] testbot/web: Remove unnecessary LastPage checks in Submit.
Only Submit.pl can decide when to call Validate() because only it knows whether this is appropriate for the current action. And this always happens as a check before moving on to the next page which means $self->{Page} is equal to $self->{LastPage}. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> --- testbot/web/Submit.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testbot/web/Submit.pl b/testbot/web/Submit.pl index 8a30110193..c73ff425c4 100644 --- a/testbot/web/Submit.pl +++ b/testbot/web/Submit.pl @@ -461,7 +461,7 @@ sub Validate($) { my ($self) = @_; - if ($self->{Page} == 2 && $self->{LastPage} == 2) + if ($self->{Page} == 2) { my $VMSelected = !1; my $VMs = CreateVMs(); @@ -481,7 +481,7 @@ sub Validate($) return !1; } } - elsif ($self->{Page} == 3 && $self->{LastPage} == 3) + elsif ($self->{Page} == 3) { if (($self->GetParam("FileType") eq "patch" && $self->GetParam("TestExecutable") !~ m/^[\w_.]+_test\.exe$/) || -- 2.19.1
participants (1)
-
Francois Gouget