X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Facct_sql_status.pm;h=248105f18aa56e8101e294e95b09265c5ef1a145;hb=674cb2d9d7105f4cc2871539b2e9f7088cdaa750;hp=78a086c3e6c601911d403983bd81c22214b705b4;hpb=ffbcf0363fb3c17e33ccb90de0b3ad2dd6b14fb5;p=freeside.git diff --git a/FS/FS/part_export/acct_sql_status.pm b/FS/FS/part_export/acct_sql_status.pm index 78a086c3e..248105f18 100644 --- a/FS/FS/part_export/acct_sql_status.pm +++ b/FS/FS/part_export/acct_sql_status.pm @@ -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' => <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;