[Rt-commit] rt branch, 4.0-trunk, updated. rt-4.0.18-119-gf94d5ca

Alex Vandiver alexmv at bestpractical.com
Mon Dec 16 11:51:39 EST 2013


The branch, 4.0-trunk has been updated
       via  f94d5ca01ff5ead7b7f55961e3f84d8b9e5ea0ba (commit)
      from  7a84d344f8a2d476443968d04bfd4b3cdb5a7083 (commit)

Summary of changes:
 lib/RT/Dashboard/Mailer.pm | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

- Log -----------------------------------------------------------------
commit f94d5ca01ff5ead7b7f55961e3f84d8b9e5ea0ba
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Fri Dec 13 19:19:04 2013 -0500

    Ensure that running a "debug" loglevel does not cause warnings
    
    $sub_fow may be undef, but is displayed at the debug level.  In the one
    codepath in which it is used, it is defaulted to 1.  Push this default
    to above where $sub_fow is used in the debug statement, to avoid
    warnings.

diff --git a/lib/RT/Dashboard/Mailer.pm b/lib/RT/Dashboard/Mailer.pm
index 276c5fb..19ea981 100644
--- a/lib/RT/Dashboard/Mailer.pm
+++ b/lib/RT/Dashboard/Mailer.pm
@@ -146,7 +146,7 @@ sub IsSubscriptionReady {
     my $sub_hour      = $subscription->SubValue('Hour');
     my $sub_dow       = $subscription->SubValue('Dow');
     my $sub_dom       = $subscription->SubValue('Dom');
-    my $sub_fow       = $subscription->SubValue('Fow');
+    my $sub_fow       = $subscription->SubValue('Fow') || 1;
 
     my ($hour, $dow, $dom) = @{ $args{LocalTime} };
 
@@ -165,8 +165,6 @@ sub IsSubscriptionReady {
         return 0 if $sub_dow ne $dow;
 
         # does it match the "every N weeks" clause?
-        $sub_fow = 1 if !$sub_fow;
-
         return 1 if $counter % $sub_fow == 0;
 
         $subscription->SetSubValues(Counter => $counter + 1)

-----------------------------------------------------------------------


More information about the rt-commit mailing list