[freeside-commits] branch FREESIDE_2_3_BRANCH updated. 3c183289ab4a1e8398913487696d33a7ca21fe0a

Ivan ivan at 420.am
Tue Aug 7 17:45:26 PDT 2012


The branch, FREESIDE_2_3_BRANCH has been updated
       via  3c183289ab4a1e8398913487696d33a7ca21fe0a (commit)
      from  4863a451a29eeb13453327b231901b5de53645f5 (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 3c183289ab4a1e8398913487696d33a7ca21fe0a
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Tue Aug 7 17:45:25 2012 -0700

    ignore extra columns in CCH diff (bad data from last update?)

diff --git a/FS/FS/tax_rate.pm b/FS/FS/tax_rate.pm
index 77cd5cb..3fdaa1e 100644
--- a/FS/FS/tax_rate.pm
+++ b/FS/FS/tax_rate.pm
@@ -758,10 +758,13 @@ sub batch_import {
     foreach my $field ( @fields ) {
       $tax_rate{$field} = shift @columns; 
     }
-    if ( scalar( @columns ) ) {
-      $dbh->rollback if $oldAutoCommit;
-      return "Unexpected trailing columns in line (wrong format?) importing tax_rate: $line";
-    }
+
+    #ignoring extra columns (bad data from last update?) and seeing if that
+    # allows the upgrade to proceed
+    #if ( scalar( @columns ) ) {
+    #  $dbh->rollback if $oldAutoCommit;
+    #  return "Unexpected trailing columns in line (wrong format?) importing tax_rate: $line";
+    #}
 
     my $error = &{$hook}(\%tax_rate);
     if ( $error ) {
@@ -1635,16 +1638,16 @@ sub process_download_and_update {
 
     if (-d $dir) {
 
-      if (-d "$dir.4") {
-        opendir(my $dirh, "$dir.4") or die "failed to open $dir.4: $!\n";
+      if (-d "$dir.9") {
+        opendir(my $dirh, "$dir.9") or die "failed to open $dir.9: $!\n";
         foreach my $file (readdir($dirh)) {
-          unlink "$dir.4/$file" if (-f "$dir.4/$file");
+          unlink "$dir.9/$file" if (-f "$dir.9/$file");
         }
         closedir($dirh);
-        rmdir "$dir.4";
+        rmdir "$dir.9";
       }
 
-      for (3, 2, 1) {
+      for (8, 7, 6, 5, 4, 3, 2, 1) {
         if ( -e "$dir.$_" ) {
           rename "$dir.$_", "$dir.". ($_+1) or die "can't rename $dir.$_: $!\n";
         }

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

Summary of changes:
 FS/FS/tax_rate.pm |   21 ++++++++++++---------
 1 files changed, 12 insertions(+), 9 deletions(-)




More information about the freeside-commits mailing list