Module: tools Branch: master Commit: 0daa015e416346f1b4f5696e629178a2fcc81960 URL: https://source.winehq.org/git/tools.git/?a=commit;h=0daa015e416346f1b4f5696e...
Author: Francois Gouget fgouget@codeweavers.com Date: Fri Nov 30 12:55:07 2018 +0100
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@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
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 a81a954..e0ccda3 100644 --- a/testbot/web/Submit.pl +++ b/testbot/web/Submit.pl @@ -456,7 +456,7 @@ sub Validate($) { my ($self) = @_;
- if ($self->{Page} == 2 && $self->{LastPage} == 2) + if ($self->{Page} == 2) { my $VMSelected = !1; my $VMs = CreateVMs(); @@ -476,7 +476,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$/) ||