Store it in a variable at the start of the file so it's easy to spot.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/web/Stats.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/testbot/web/Stats.pl b/testbot/web/Stats.pl index 5ec69798f4..8433c6d373 100644 --- a/testbot/web/Stats.pl +++ b/testbot/web/Stats.pl @@ -32,6 +32,8 @@ use WineTestBot::Log; # For Elapsed() use WineTestBot::Utils; use WineTestBot::VMs;
+my $DAYS_DEFAULT = 7; +
sub _initialize($$$) { @@ -46,7 +48,7 @@ sub _initialize($$$) if (!$self->GetParam("Days") or !$self->Validate() or !int($self->GetParam("Days"))) # 00 case! { - $self->SetParam("Days", 7) if (!defined $self->{ErrMessage}); + $self->SetParam("Days", $DAYS_DEFAULT) if (!defined $self->{ErrMessage}); $self->{NoStats} = 1; } # The action is a no-op so unset it to not need to redefine OnAction()