X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Facct_sql_status.pm;h=e6aeb20716494aea863f5eb74224fd2546843d66;hp=78a086c3e6c601911d403983bd81c22214b705b4;hb=ba161fc6892f284af6504b6bba578523a248f1ba;hpb=04a0d771475412b6f7304257ffea8f12326ae096 diff --git a/FS/FS/part_export/acct_sql_status.pm b/FS/FS/part_export/acct_sql_status.pm index 78a086c3e..e6aeb2071 100644 --- a/FS/FS/part_export/acct_sql_status.pm +++ b/FS/FS/part_export/acct_sql_status.pm @@ -33,16 +33,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 +60,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 +81,9 @@ sub export_getstatus { #htmlref not implemented/used for this status export + + ''; #no errors + } 1;