Difference between revisions of "Talk:Mailstats"
From SME Server
Jump to navigationJump to search (New page: A couple questions about ''Interval'': The comments (and the wiki) state that I can change the reporting Interval using "week", "fortnight", or "month", eg: config setprop mailstats Inte...) |
|||
Line 5: | Line 5: | ||
However, the specific code looks for "weekly", "fortnightly", "monthly": | However, the specific code looks for "weekly", "fortnightly", "monthly": | ||
− | + | my $interval = $cdb->get('mailstats')->prop('Interval') || 'daily'; | |
− | if ($interval eq "weekly") { | + | if ($interval eq "weekly") { |
− | $secsininterval = 86400*7; | + | $secsininterval = 86400*7; |
− | } elsif ($interval eq "fortnightly") { | + | } elsif ($interval eq "fortnightly") { |
− | $secsininterval = 86400*14; | + | $secsininterval = 86400*14; |
− | } elsif ($interval eq "monthly") { | + | } elsif ($interval eq "monthly") { |
− | $secsininterval = 86400; | + | $secsininterval = 86400; |
− | } elsif ($interval =~m/\d+/) { | + | } elsif ($interval =~m/\d+/) { |
− | $secsininterval = $interval*3600; | + | $secsininterval = $interval*3600; |
− | }; | + | }; |
so, does "week" eq "weekly" in perl (I don't know the answer)? | so, does "week" eq "weekly" in perl (I don't know the answer)? |
Latest revision as of 12:59, 14 October 2008
A couple questions about Interval:
The comments (and the wiki) state that I can change the reporting Interval using "week", "fortnight", or "month", eg:
config setprop mailstats Interval week
However, the specific code looks for "weekly", "fortnightly", "monthly":
my $interval = $cdb->get('mailstats')->prop('Interval') || 'daily'; if ($interval eq "weekly") { $secsininterval = 86400*7; } elsif ($interval eq "fortnightly") { $secsininterval = 86400*14; } elsif ($interval eq "monthly") { $secsininterval = 86400; } elsif ($interval =~m/\d+/) { $secsininterval = $interval*3600; };
so, does "week" eq "weekly" in perl (I don't know the answer)?
Also, it looks as though month/monthly sets the interval to 86400 rather than 86400*30?
Mmccarn 11:58, 14 October 2008 (UTC)