[freeside-commits] branch master updated. 21891ab9181cb54c36d78d6aacccadc1aaf910d7

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


The branch, master has been updated
       via  21891ab9181cb54c36d78d6aacccadc1aaf910d7 (commit)
      from  7792fb0d3dfa4e77f41b8055e96a8938153a7677 (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 21891ab9181cb54c36d78d6aacccadc1aaf910d7
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Tue Aug 7 17:45:24 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