[freeside-commits] freeside/FS/FS/part_export communigate_pro.pm, 1.16.4.4, 1.16.4.5
Ivan,,,
ivan at wavetail.420.am
Sun Feb 21 01:19:10 PST 2010
Update of /home/cvs/cvsroot/freeside/FS/FS/part_export
In directory wavetail.420.am:/tmp/cvs-serv25324/FS/FS/part_export
Modified Files:
Tag: FREESIDE_1_9_BRANCH
communigate_pro.pm
Log Message:
communigate, RT#7083
Index: communigate_pro.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_export/communigate_pro.pm,v
retrieving revision 1.16.4.4
retrieving revision 1.16.4.5
diff -u -d -r1.16.4.4 -r1.16.4.5
--- communigate_pro.pm 21 Feb 2010 07:28:12 -0000 1.16.4.4
+++ communigate_pro.pm 21 Feb 2010 09:19:07 -0000 1.16.4.5
@@ -78,10 +78,6 @@
map { $quotas{$_} => $svc_acct->$_() }
grep $svc_acct->$_(), keys %quotas
);
-
- #XXX preferences phase 1: message delete method, on logout remove trash
- #phase 2: language, time zone, layout, pronto style, send read receipts
-
#phase 2: pwdallowed, passwordrecovery, allowed mail rules,
# RPOP modifications, accepts mail to all, add trailer to sent mail
#phase 3: archive messages, mailing lists
@@ -97,16 +93,36 @@
if $self->option('externalFlag');
#let's do the create realtime too, for much the same reasons, and to avoid
- #pain of trying to queue w/dep the aliases
+ #pain of trying to queue w/dep the prefs & aliases
#my $r=
eval { $self->communigate_pro_runcommand( @options ) };
return $@ if $@;
- my $err= $self->communigate_pro_queue( $svc_acct->svcnum, 'SetAccountAliases',
- $self->export_username($svc_acct),
- [ split(/\s*,\s*/, $svc_acct->cgp_aliases) ],
- );
- warn "WARNING: error queueing SetAccountAliases job: $err" if $err;
+ #preferences
+ my %prefs = ();
+ $prefs{'DeleteMode'} = $svc_acct->cgp_deletemode if $svc_acct->cgp_deletemode;
+ $prefs{'EmptyTrash'} = $svc_acct->cgp_emptytrash if $svc_acct->cgp_emptytrash;
+ #phase 2: language, time zone, layout, pronto style, send read receipts
+ if ( keys %prefs ) {
+ my $pref_err = $self->communigate_pro_queue( $svc_acct->svcnum,
+ 'UpdateAccountPrefs',
+ $self->export_username($svc_acct),
+ %prefs,
+ );
+ warn "WARNING: error queueing UpdateAccountPrefs job: $pref_err"
+ if $pref_err;
+ }
+
+ #aliases
+ if ( $svc_acct->cgp_aliases ) {
+ my $alias_err = $self->communigate_pro_queue( $svc_acct->svcnum,
+ 'SetAccountAliases',
+ $self->export_username($svc_acct),
+ [ split(/\s*,\s*/, $svc_acct->cgp_aliases) ],
+ );
+ warn "WARNING: error queueing SetAccountAliases job: $alias_err"
+ if $alias_err;
+ }
'';
@@ -187,6 +203,23 @@
return $error if $error;
}
+ #preferences
+ my %prefs = ();
+ $prefs{'DeleteMode'} = $new->cgp_deletemode
+ if $old->cgp_deletemode ne $new->cgp_deletemode;
+ $prefs{'EmptyTrash'} = $new->cgp_emptytrash
+ if $old->cgp_emptytrash ne $new->cgp_emptytrash;
+ #phase 2: language, time zone, layout, pronto style, send read receipts
+ if ( keys %prefs ) {
+ my $pref_err = $self->communigate_pro_queue( $new->svcnum,
+ 'UpdateAccountPrefs',
+ $self->export_username($new),
+ %prefs,
+ );
+ warn "WARNING: error queueing UpdateAccountPrefs job: $pref_err"
+ if $pref_err;
+ }
+
if ( $old->cgp_aliases ne $new->cgp_aliases ) {
my $error = $self->communigate_pro_queue(
$new->svcnum,
@@ -197,9 +230,6 @@
return $error if $error;
}
- #XXX preferences phase 1: message delete method, on logout remove trash
- #phase 2: language, time zone, layout, pronto style, send read receipts
-
'';
}
@@ -467,6 +497,7 @@
my %kludge_methods = (
'CreateAccount' => 'CreateAccount',
'UpdateAccountSettings' => 'UpdateAccountSettings',
+ 'UpdateAccountPrefs' => 'cp_Scalar_Hash',
'CreateDomain' => 'cp_Scalar_Hash',
'CreateSharedDomain' => 'cp_Scalar_Hash',
'UpdateDomainSettings' => 'UpdateDomainSettings',
More information about the freeside-commits
mailing list