[freeside-commits] freeside/FS/FS Schema.pm, 1.227, 1.228 acct_snarf.pm, 1.3, 1.4 Mason.pm, 1.48, 1.49
Ivan,,,
ivan at wavetail.420.am
Sat Aug 7 00:39:07 PDT 2010
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv10134/FS/FS
Modified Files:
Schema.pm acct_snarf.pm Mason.pm
Log Message:
communigate phase 3: RPOP/acct_snarf, RT#7515
Index: Schema.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Schema.pm,v
retrieving revision 1.227
retrieving revision 1.228
diff -u -w -d -r1.227 -r1.228
--- Schema.pm 6 Aug 2010 21:28:08 -0000 1.227
+++ Schema.pm 7 Aug 2010 07:39:05 -0000 1.228
@@ -2171,12 +2171,18 @@
'acct_snarf' => {
'columns' => [
- 'snarfnum', 'int', '', '', '', '',
+ 'snarfnum', 'serial', '', '', '', '',
+ 'snarfname', 'varchar', 'NULL', $char_d, '', '',
'svcnum', 'int', '', '', '', '',
'machine', 'varchar', '', 255, '', '',
'protocol', 'varchar', '', $char_d, '', '',
'username', 'varchar', '', $char_d, '', '',
'_password', 'varchar', '', $char_d, '', '',
+ 'check_freq', 'int', 'NULL', '', '', '',
+ 'leave', 'char', 'NULL', 1, '', '',
+ 'apop', 'char', 'NULL', 1, '', '',
+ 'tls', 'char', 'NULL', 1, '', '',
+ 'mailbox', 'varchar', 'NULL', $char_d, '', '',
],
'primary_key' => 'snarfnum',
'unique' => [],
Index: acct_snarf.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/acct_snarf.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -d -r1.3 -r1.4
--- acct_snarf.pm 25 Oct 2003 02:05:44 -0000 1.3
+++ acct_snarf.pm 7 Aug 2010 07:39:05 -0000 1.4
@@ -2,6 +2,7 @@
use strict;
use vars qw( @ISA );
+use Tie::IxHash;
use FS::Record;
@ISA = qw( FS::Record );
@@ -35,6 +36,8 @@
=item snarfnum - primary key
+=item snarfname - Label
+
=item svcnum - Account (see L<FS::svc_acct>)
=item machine - external machine to download mail from
@@ -100,11 +103,17 @@
my $self = shift;
my $error =
$self->ut_numbern('snarfnum')
+ || $self->ut_textn('snarfname') #alphasn?
|| $self->ut_number('svcnum')
|| $self->ut_foreign_key('svcnum', 'svc_acct', 'svcnum')
|| $self->ut_domain('machine')
|| $self->ut_alphan('protocol')
|| $self->ut_textn('username')
+ || $self->ut_numbern('check_freq')
+ || $self->ut_enum('leave', [ '', 'Y' ])
+ || $self->ut_enum('apop', [ '', 'Y' ])
+ || $self->ut_enum('tls', [ '', 'Y' ])
+ || $self->ut_alphan('mailbox')
;
return $error if $error;
@@ -114,6 +123,32 @@
''; #no error
}
+sub check_freq_labels {
+
+ tie my %hash, 'Tie::IxHash',
+ 0 => 'Never',
+ 60 => 'minute',
+ 120 => '2 minutes',
+ 180 => '3 minutes',
+ 300 => '5 minutes',
+ 600 => '10 minutes',
+ 900 => '15 minutes',
+ 1800 => '30 minutes',
+ 3600 => 'hour',
+ 7200 => '2 hours',
+ 10800 => '3 hours',
+ 21600 => '6 hours',
+ 43200 => '12 hours',
+ 86400 => 'day',
+ 172800 => '2 days',
+ 259200 => '3 days',
+ 604800 => 'week',
+ 1000000000 => 'Disabled',
+ ;
+
+ \%hash;
+}
+
=back
=head1 BUGS
Index: Mason.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Mason.pm,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -w -d -r1.48 -r1.49
--- Mason.pm 3 Aug 2010 03:30:20 -0000 1.48
+++ Mason.pm 7 Aug 2010 07:39:05 -0000 1.49
@@ -249,6 +249,7 @@
use FS::rate_time_interval;
use FS::msg_template;
use FS::part_tag;
+ use FS::acct_snarf;
# Sammath Naur
if ( $FS::Mason::addl_handler_use ) {
More information about the freeside-commits
mailing list