add skip_dcontext_suffix to skip CDRs with dcontext ending in a definable string...
[freeside.git] / FS / FS / part_export / acct_sql_status.pm
index 78a086c..248105f 100644 (file)
@@ -14,6 +14,7 @@ delete $options{$_} for qw( table schema static primary_key );
   'desc'     => 'Mailbox status information from SQL',
   'options'  => \%options,
   'nodomain' => '',
+  'no_machine' => 1,
   'notes'    => <<END
 Read mailbox status information (vacation and spam settings) from an SQL
 database, tables "vacation" and "users" respectively.
@@ -33,16 +34,16 @@ sub export_getstatus {
   my($self, $svc_acct, $htmlref, $hashref) = @_;
 
   my $dbh = DBI->connect( map $self->option($_), qw(datasrc username password) )
-    or do { $hashref->{'error'} = "can't connect: ".  $DBI::errstr; return; };
+    or return "can't connect: ".  $DBI::errstr;
 
   ###
   #vacation settings
   ###
 
   my $vsth = $dbh->prepare('SELECT * FROM vacation WHERE email = ?')
-    or do { $hashref->{'error'} = "can't prepare: ". $dbh->errstr; return; };
+    or return "can't prepare: ". $dbh->errstr;
   $vsth->execute( $svc_acct->email )
-    or do { $hashref->{'error'} = "can't execute: ". $vsth->errstr; return; };
+    or return "can't execute: ". $vsth->errstr;
 
   my $vrow = $vsth->fetchrow_hashref;
   if ( $vrow ) {
@@ -60,9 +61,9 @@ sub export_getstatus {
   ###
 
   my $ssth = $dbh->prepare('SELECT * FROM users WHERE address = ?')
-    or do { $hashref->{'error'} = "can't prepare: ". $dbh->errstr; return; };
+    or return "can't prepare: ". $dbh->errstr;
   $ssth->execute( $svc_acct->email )
-    or do { $hashref->{'error'} = "can't execute: ". $ssth->errstr; return; };
+    or return "can't execute: ". $ssth->errstr;
 
   my $srow = $ssth->fetchrow_hashref;
   if ( $srow ) {
@@ -81,6 +82,9 @@ sub export_getstatus {
 
   #htmlref not implemented/used for this status export
 
+
+  ''; #no errors
+
 }
 
 1;