diff options
author | ivan <ivan> | 2005-09-07 22:52:23 +0000 |
---|---|---|
committer | ivan <ivan> | 2005-09-07 22:52:23 +0000 |
commit | 3f15beb065910e8bfb14f46fc85ac23ad3d469df (patch) | |
tree | d37a723f9a98f0968cd5b8bb2681cf6084d9bfe9 | |
parent | dfff614ce7924dbb3d006a377af88acbdf02f12a (diff) |
add hourly frequency
-rw-r--r-- | FS/FS/part_pkg.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/FS/FS/part_pkg.pm b/FS/FS/part_pkg.pm index 73e469cf8..db31e456f 100644 --- a/FS/FS/part_pkg.pm +++ b/FS/FS/part_pkg.pm @@ -420,7 +420,7 @@ sub check { my $error = $self->ut_number('freq'); return $error if $error; } else { - $self->freq =~ /^(\d+[dw]?)$/ + $self->freq =~ /^(\d+[hdw]?)$/ or return "Illegal or empty freq: ". $self->freq; $self->freq($1); } @@ -535,6 +535,7 @@ Returns an english representation of the I<freq> field, such as "monthly", tie %freq, 'Tie::IxHash', '0' => '(no recurring fee)', + '1h' => 'hourly', '1d' => 'daily', '1w' => 'weekly', '2w' => 'biweekly (every 2 weeks)', @@ -557,8 +558,8 @@ sub freq_pretty { $freq{$freq}; } else { my $interval = 'month'; - if ( $freq =~ /^(\d+)([dw])$/ ) { - my %interval = ( 'd'=>'day', 'w'=>'week' ); + if ( $freq =~ /^(\d+)([hdw])$/ ) { + my %interval = ( 'h' => 'hour', 'd'=>'day', 'w'=>'week' ); $interval = $interval{$2}; } if ( $1 == 1 ) { |