[freeside-commits] branch master updated. f79a7ca7e5b3e484646190e15f995b9779089ff0

Ivan ivan at 420.am
Thu Jan 29 17:59:11 PST 2015


The branch, master has been updated
       via  f79a7ca7e5b3e484646190e15f995b9779089ff0 (commit)
       via  24c38179b5d35f4edf2ab5fa157c7ca86046552e (commit)
      from  07f2ee893fc57164ae3672f1a494d395c4eb1d26 (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 f79a7ca7e5b3e484646190e15f995b9779089ff0
Merge: 24c3817 07f2ee8
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Thu Jan 29 17:59:07 2015 -0800

    Merge branch 'master' of git.freeside.biz:/home/git/freeside


07f2ee893fc57164ae3672f1a494d395c4eb1d26
diff --git a/FS/FS/Upgrade.pm b/FS/FS/Upgrade.pm
index 5d092ed..f84e4e5 100644
--- a/FS/FS/Upgrade.pm
+++ b/FS/FS/Upgrade.pm
@@ -46,22 +46,6 @@ sub upgrade_config {
 
   my $conf = new FS::Conf;
 
-  if ($conf->config('invoice_from') =~ /\<(.*)\>/) {
-    my $realemail = $1;
-    $realemail =~ s/^\s*//; # remove leading spaces
-    $realemail =~ s/\s*$//; # remove trailing spaces
-    my $realname = $conf->config('invoice_from');
-    $realname =~ s/\<.*\>//; # remove email address
-    $realname =~ s/^\s*//; # remove leading spaces
-    $realname =~ s/\s*$//; # remove trailing spaces
-    # properly quote names that contain punctuation
-    if (($realname =~ /[^[:alnum:][:space:]]/) && ($realname !~ /^\".*\"$/)) {
-      $realname = '"' . $realname . '"';
-    }
-    $conf->set('invoice_from_name', $realname);
-    $conf->set('invoice_from', $realemail);
-  }
-
   $conf->touch('payment_receipt')
     if $conf->exists('payment_receipt_email')
     || $conf->config('payment_receipt_msgnum');
@@ -79,8 +63,15 @@ sub upgrade_config {
     }
   }
 
+  my @agents = qsearch('agent', {});
+
   upgrade_overlimit_groups($conf);
-  map { upgrade_overlimit_groups($conf,$_->agentnum) } qsearch('agent', {});
+  map { upgrade_overlimit_groups($conf,$_->agentnum) } @agents;
+
+  upgrade_invoice_from($conf);
+  foreach my $agent (@agents) {
+    upgrade_invoice_from($conf,$agent->agentnum);
+  }
 
   my $DIST_CONF = '/usr/local/etc/freeside/default_conf/';#DIST_CONF in Makefile
   $conf->set($_, scalar(read_file( "$DIST_CONF/$_" )) )
@@ -183,6 +174,28 @@ sub upgrade_overlimit_groups {
     }
 }
 
+sub upgrade_invoice_from {
+  my ($conf, $agentnum) = @_;
+  if (
+      (!$conf->config('invoice_from_name',$agentnum)) && 
+      ($conf->config('invoice_from',$agentnum) =~ /\<(.*)\>/)
+  ) {
+    my $realemail = $1;
+    $realemail =~ s/^\s*//; # remove leading spaces
+    $realemail =~ s/\s*$//; # remove trailing spaces
+    my $realname = $conf->config('invoice_from',$agentnum);
+    $realname =~ s/\<.*\>//; # remove email address
+    $realname =~ s/^\s*//; # remove leading spaces
+    $realname =~ s/\s*$//; # remove trailing spaces
+    # properly quote names that contain punctuation
+    if (($realname =~ /[^[:alnum:][:space:]]/) && ($realname !~ /^\".*\"$/)) {
+      $realname = '"' . $realname . '"';
+    }
+    $conf->set('invoice_from_name', $realname, $agentnum);
+    $conf->set('invoice_from', $realemail, $agentnum);
+  }
+}
+
 =item upgrade
 
 =cut

commit 24c38179b5d35f4edf2ab5fa157c7ca86046552e
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Thu Jan 29 17:59:03 2015 -0800

    link business-onlinepayment conf to docs

diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index 239e304..802794c 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -958,7 +958,7 @@ sub reason_type_options {
   {
     'key'         => 'business-onlinepayment',
     'section'     => 'billing',
-    'description' => '<a href="http://search.cpan.org/search?mode=module&query=Business%3A%3AOnlinePayment">Business::OnlinePayment</a> support, at least three lines: processor, login, and password.  An optional fourth line specifies the action or actions (multiple actions are separated with `,\': for example: `Authorization Only, Post Authorization\').    Optional additional lines are passed to Business::OnlinePayment as %processor_options.',
+    'description' => '<a href="http://search.cpan.org/search?mode=module&query=Business%3A%3AOnlinePayment">Business::OnlinePayment</a> support, at least three lines: processor, login, and password.  An optional fourth line specifies the action or actions (multiple actions are separated with `,\': for example: `Authorization Only, Post Authorization\').    Optional additional lines are passed to Business::OnlinePayment as %processor_options.  For more detailed information and examples see the <a href="http://www.freeside.biz/mediawiki/index.php/Freeside:3:Documentation:Administration:Real-time_Processing">real-time credit card processing documentation</a>.',
     'type'        => 'textarea',
   },
 

07f2ee893fc57164ae3672f1a494d395c4eb1d26
diff --git a/FS/FS/Upgrade.pm b/FS/FS/Upgrade.pm
index 5d092ed..f84e4e5 100644
--- a/FS/FS/Upgrade.pm
+++ b/FS/FS/Upgrade.pm
@@ -46,22 +46,6 @@ sub upgrade_config {
 
   my $conf = new FS::Conf;
 
-  if ($conf->config('invoice_from') =~ /\<(.*)\>/) {
-    my $realemail = $1;
-    $realemail =~ s/^\s*//; # remove leading spaces
-    $realemail =~ s/\s*$//; # remove trailing spaces
-    my $realname = $conf->config('invoice_from');
-    $realname =~ s/\<.*\>//; # remove email address
-    $realname =~ s/^\s*//; # remove leading spaces
-    $realname =~ s/\s*$//; # remove trailing spaces
-    # properly quote names that contain punctuation
-    if (($realname =~ /[^[:alnum:][:space:]]/) && ($realname !~ /^\".*\"$/)) {
-      $realname = '"' . $realname . '"';
-    }
-    $conf->set('invoice_from_name', $realname);
-    $conf->set('invoice_from', $realemail);
-  }
-
   $conf->touch('payment_receipt')
     if $conf->exists('payment_receipt_email')
     || $conf->config('payment_receipt_msgnum');
@@ -79,8 +63,15 @@ sub upgrade_config {
     }
   }
 
+  my @agents = qsearch('agent', {});
+
   upgrade_overlimit_groups($conf);
-  map { upgrade_overlimit_groups($conf,$_->agentnum) } qsearch('agent', {});
+  map { upgrade_overlimit_groups($conf,$_->agentnum) } @agents;
+
+  upgrade_invoice_from($conf);
+  foreach my $agent (@agents) {
+    upgrade_invoice_from($conf,$agent->agentnum);
+  }
 
   my $DIST_CONF = '/usr/local/etc/freeside/default_conf/';#DIST_CONF in Makefile
   $conf->set($_, scalar(read_file( "$DIST_CONF/$_" )) )
@@ -183,6 +174,28 @@ sub upgrade_overlimit_groups {
     }
 }
 
+sub upgrade_invoice_from {
+  my ($conf, $agentnum) = @_;
+  if (
+      (!$conf->config('invoice_from_name',$agentnum)) && 
+      ($conf->config('invoice_from',$agentnum) =~ /\<(.*)\>/)
+  ) {
+    my $realemail = $1;
+    $realemail =~ s/^\s*//; # remove leading spaces
+    $realemail =~ s/\s*$//; # remove trailing spaces
+    my $realname = $conf->config('invoice_from',$agentnum);
+    $realname =~ s/\<.*\>//; # remove email address
+    $realname =~ s/^\s*//; # remove leading spaces
+    $realname =~ s/\s*$//; # remove trailing spaces
+    # properly quote names that contain punctuation
+    if (($realname =~ /[^[:alnum:][:space:]]/) && ($realname !~ /^\".*\"$/)) {
+      $realname = '"' . $realname . '"';
+    }
+    $conf->set('invoice_from_name', $realname, $agentnum);
+    $conf->set('invoice_from', $realemail, $agentnum);
+  }
+}
+
 =item upgrade
 
 =cut

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

Summary of changes:
 FS/FS/Conf.pm |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)




More information about the freeside-commits mailing list