[freeside-commits] branch master updated. 302ed74842d5eae7bcc7c5ce68ee5f102c381d6f

Mark Wells mark at 420.am
Sat Sep 29 00:21:13 PDT 2012


The branch, master has been updated
       via  302ed74842d5eae7bcc7c5ce68ee5f102c381d6f (commit)
      from  a10c9fb8cece00fc3b996f56c61b6841e93c1551 (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 302ed74842d5eae7bcc7c5ce68ee5f102c381d6f
Author: Mark Wells <mark at freeside.biz>
Date:   Sat Sep 29 00:20:38 2012 -0700

    also fix longtable in alternate invoice templates, #13908

diff --git a/FS/FS/Upgrade.pm b/FS/FS/Upgrade.pm
index 7dd889f..3f76f51 100644
--- a/FS/FS/Upgrade.pm
+++ b/FS/FS/Upgrade.pm
@@ -71,11 +71,16 @@ sub upgrade_config {
       qw( quotation_html quotation_latex quotation_latexnotes );
 
   # change 'fslongtable' to 'longtable'
-  foreach my $name (qw(invoice_latex quotation_latex)) {
-    my $value = join("\n",$conf->config($name));
-    if (length($value)) {
+  # in invoice and quotation main templates, and also in all secondary 
+  # invoice templates
+  my @latex_confs =
+    qsearch('conf', { 'name' => {op=>'LIKE', value=>'%latex%'} });
+
+  foreach my $c (@latex_confs) {
+    my $value = $c->value;
+    if (length($value) and $value =~ /fslongtable/) {
       $value =~ s/fslongtable/longtable/g;
-      $conf->set($name, $value);
+      $conf->set($c->name, $value, $c->agentnum);
     }
   }
 

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

Summary of changes:
 FS/FS/Upgrade.pm |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)




More information about the freeside-commits mailing list