[freeside-commits] branch master updated. adaccb1ca8e3954a7899ef36bb23c05893ebbc81

Mike Robinson miker at 420.am
Mon Apr 30 13:09:40 PDT 2012


The branch, master has been updated
       via  adaccb1ca8e3954a7899ef36bb23c05893ebbc81 (commit)
      from  16be5a799284b89137ec1802129de29f2b262c46 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit adaccb1ca8e3954a7899ef36bb23c05893ebbc81
Author: Mike Robinson <miker at freeside.biz>
Date:   Mon Apr 30 15:09:19 2012 -0500

    14919: make indentation and coding match expectations

diff --git a/FS/FS/option_Common.pm b/FS/FS/option_Common.pm
index 40b12cf..c1dda22 100644
--- a/FS/FS/option_Common.pm
+++ b/FS/FS/option_Common.pm
@@ -67,13 +67,8 @@ sub insert {
 
   my $error;
   
-  $error = $self->check_options($options);
-  if ( $error ) {
-    $dbh->rollback if $oldAutoCommit;
-    return $error;
-  }
-  
-  $error = $self->SUPER::insert;
+  $error = $self->check_options($options) 
+           || $self->SUPER::insert;
   if ( $error ) {
     $dbh->rollback if $oldAutoCommit;
     return $error;
diff --git a/FS/FS/part_export/netsapiens.pm b/FS/FS/part_export/netsapiens.pm
index b30951d..aa89d47 100644
--- a/FS/FS/part_export/netsapiens.pm
+++ b/FS/FS/part_export/netsapiens.pm
@@ -83,16 +83,16 @@ sub rebless { shift; }
 
 
 sub check_options {
-	my ($self, $options) = @_;
+  my ($self, $options) = @_;
 	
-	my $rex = qr/$RE{URI}{HTTP}{-scheme => qr|https?|}/;			# match any "http:" or "https:" URL
+  my $rex = qr/$RE{URI}{HTTP}{-scheme => qr|https?|}/;			# match any "http:" or "https:" URL
 	
-	for my $key (qw/url device_url/) {
-		if ($$options{$key} && ($$options{$key} !~ $rex)) {
-				return "Invalid (URL): " . $$options{$key};
-		}
-	}
-	return '';
+  for my $key (qw/url device_url/) {
+    if ($$options{$key} && ($$options{$key} !~ $rex)) {
+      return "Invalid (URL): " . $$options{$key};
+    }
+  }
+  return '';
 }
 
 

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/option_Common.pm          |    9 ++-------
 FS/FS/part_export/netsapiens.pm |   16 ++++++++--------
 2 files changed, 10 insertions(+), 15 deletions(-)




More information about the freeside-commits mailing list