summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/part_export/communigate_pro.pm10
-rw-r--r--FS/FS/svc_acct.pm24
2 files changed, 20 insertions, 14 deletions
diff --git a/FS/FS/part_export/communigate_pro.pm b/FS/FS/part_export/communigate_pro.pm
index 2cad24467..3e1213e84 100644
--- a/FS/FS/part_export/communigate_pro.pm
+++ b/FS/FS/part_export/communigate_pro.pm
@@ -85,10 +85,12 @@ sub _export_insert_svc_acct {
'MailToAll' =>($svc_acct->cgp_mailtoall ?'YES':'NO'),
'AddMailTrailer' =>($svc_acct->cgp_addmailtrailer ?'YES':'NO'),
+ 'ArchiveMessagesAfter' => $svc_acct->cgp_archiveafter,
+
map { $quotas{$_} => $svc_acct->$_() }
grep $svc_acct->$_(), keys %quotas
);
- #XXX phase 3: archive messages, mailing lists
+ #XXX phase 3: mailing lists
my @options = ( 'CreateAccount',
'accountName' => $self->export_username($svc_acct),
@@ -194,6 +196,7 @@ sub _export_insert_svc_domain {
'RPOPAllowed' =>($svc_domain->acct_def_cgp_rpopallowed ?'YES':'NO'),
'MailToAll' =>($svc_domain->acct_def_cgp_mailtoall ?'YES':'NO'),
'AddMailTrailer' =>($svc_domain->acct_def_cgp_addmailtrailer ?'YES':'NO'),
+ 'ArchiveMessagesAfter' => $svc_domain->acct_def_cgp_archiveafter,
);
warn "WARNING: error queueing SetAccountDefaults job: $def_err"
if $def_err;
@@ -318,8 +321,10 @@ sub _export_replace_svc_acct {
if $old->cgp_mailtoall ne $new->cgp_mailtoall;
$settings{'AddMailTrailer'} = ( $new->cgp_addmailtrailer ? 'YES':'NO' )
if $old->cgp_addmailtrailer ne $new->cgp_addmailtrailer;
+ $settings{'ArchiveMessagesAfter'} = $new->cgp_archiveafter
+ if $old->cgp_archiveafter ne $new->cgp_archiveafter;
- #XXX phase 3: archive messages, mailing lists
+ #XXX phase 3: mailing lists
if ( keys %settings ) {
my $error = $self->communigate_pro_queue(
@@ -441,6 +446,7 @@ sub _export_replace_svc_domain {
'RPOPAllowed' => ( $new->acct_def_cgp_rpopallowed ? 'YES' : 'NO' ),
'MailToAll' => ( $new->acct_def_cgp_mailtoall ? 'YES' : 'NO' ),
'AddMailTrailer' => ( $new->acct_def_cgp_addmailtrailer ? 'YES' : 'NO' ),
+ 'ArchiveMessagesAfter' => $new->acct_def_cgp_archiveafter,
);
warn "WARNING: error queueing SetAccountDefaults job: $def_err"
if $def_err;
diff --git a/FS/FS/svc_acct.pm b/FS/FS/svc_acct.pm
index 707b33a6f..801c46533 100644
--- a/FS/FS/svc_acct.pm
+++ b/FS/FS/svc_acct.pm
@@ -444,19 +444,19 @@ sub table_info {
label => 'Archive messages after',
type => 'select',
select_hash => [
- -2 => 'default(730 day(s))',
+ -2 => 'default(730 days)',
0 => 'Never',
- 86400 => '24 hour(s)',
- 172800 => '2 day(s)',
- 259200 => '3 day(s)',
- 432000 => '5 day(s)',
- 604800 => '7 day(s)',
- 1209600 => '2 week(s)',
- 2592000 => '30 day(s)',
- 7776000 => '90 day(s)',
- 15552000 => '180 day(s)',
- 31536000 => '365 day(s)',
- 63072000 => '730 day(s)',
+ 86400 => '24 hours',
+ 172800 => '2 days',
+ 259200 => '3 days',
+ 432000 => '5 days',
+ 604800 => '7 days',
+ 1209600 => '2 weeks',
+ 2592000 => '30 days',
+ 7776000 => '90 days',
+ 15552000 => '180 days',
+ 31536000 => '365 days',
+ 63072000 => '730 days',
],
disable_inventory => 1,
disable_select => 1,