[tools] testbot/web: Better document the default Days stats page value.

Francois Gouget fgouget at codeweavers.com
Tue Mar 22 07:20:59 CDT 2022


Store it in a variable at the start of the file so it's easy to spot.

Signed-off-by: Francois Gouget <fgouget at 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()
-- 
2.30.2



More information about the wine-devel mailing list