[freeside-commits] freeside/FS/FS/part_export acct_google.pm, 1.1.2.3, 1.1.2.4
Mark Wells
mark at wavetail.420.am
Sat Apr 30 14:22:58 PDT 2011
Update of /home/cvs/cvsroot/freeside/FS/FS/part_export
In directory wavetail.420.am:/tmp/cvs-serv27569/FS/FS/part_export
Modified Files:
Tag: FREESIDE_2_1_BRANCH
acct_google.pm
Log Message:
better error handling in google export, #12064
Index: acct_google.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_export/acct_google.pm,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -u -w -d -r1.1.2.3 -r1.1.2.4
--- acct_google.pm 22 Mar 2011 21:03:17 -0000 1.1.2.3
+++ acct_google.pm 30 Apr 2011 21:22:55 -0000 1.1.2.4
@@ -89,15 +89,18 @@
);
}
-sub captcha_url {
+sub auth_error {
my $self = shift;
my $google = $self->google_handle;
- if (exists ($google->{'captcha_url'}) ) {
- return 'http://www.google.com/accounts/'.$google->{'captcha_url'};
- }
- else {
- return '';
+ if ( $google->{'error'} ) {
+ my $url = $google->{'captcha_url'} || '';
+ $url = "http://www.google.com/accounts/$url" if $url;
+ return { 'captcha_url' => $url,
+ 'message' =>
+ 'Unable to connect to the Google API: '.$google->{'error'}.'.',
+ };
}
+ return; #nothing on success
}
sub captcha_auth {
More information about the freeside-commits
mailing list