[freeside-commits] branch FREESIDE_3_BRANCH updated. be0e9e416110d38acdc864a9019bfc47870ee5c2

Mark Wells mark at 420.am
Wed Mar 12 14:09:11 PDT 2014


The branch, FREESIDE_3_BRANCH has been updated
       via  be0e9e416110d38acdc864a9019bfc47870ee5c2 (commit)
       via  5daa6b776da674c41a04a93bd7f7e8568829409b (commit)
      from  235d99a60f1ec1a68afcd4614005352ce0f8b89f (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 be0e9e416110d38acdc864a9019bfc47870ee5c2
Author: Mark Wells <mark at freeside.biz>
Date:   Tue Mar 11 19:10:19 2014 -0700

    allow utf8 characters in CDR details, #28102

diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm
index e839879..88e5411 100644
--- a/FS/FS/Record.pm
+++ b/FS/FS/Record.pm
@@ -2366,8 +2366,10 @@ sub ut_text {
   #warn "msgcat ". \&msgcat. "\n";
   #warn "notexist ". \&notexist. "\n";
   #warn "AUTOLOAD ". \&AUTOLOAD. "\n";
+  # \p{Word} = alphanumerics, marks (diacritics), and connectors
+  # see perldoc perluniprops
   $self->getfield($field)
-    =~ /^([\wô \!\@\#\$\%\&\(\)\-\+\;\:\'\"\,\.\?\/\=\[\]\<\>$money_char]+)$/
+    =~ /^([\p{Word} \!\@\#\$\%\&\(\)\-\+\;\:\'\"\,\.\?\/\=\[\]\<\>$money_char]+)$/
       or return gettext('illegal_or_empty_text'). " $field: ".
                  $self->getfield($field);
   $self->setfield($field,$1);
@@ -2741,7 +2743,7 @@ May not be null.
 sub ut_name {
   my( $self, $field ) = @_;
 #  warn "ut_name allowed alphanumerics: +(sort grep /\w/, map { chr() } 0..255), "\n";
-  $self->getfield($field) =~ /^([\w \,\.\-\']+)$/
+  $self->getfield($field) =~ /^([\p{Word} \,\.\-\']+)$/
     or return gettext('illegal_name'). " $field: ". $self->getfield($field);
   my $name = $1;
   $name =~ s/^\s+//; 
@@ -3206,6 +3208,8 @@ sub _quote {
   my $column_type = $column_obj->type;
   my $nullable = $column_obj->null;
 
+  utf8::upgrade($value);
+
   warn "  $table.$column: $value ($column_type".
        ( $nullable ? ' NULL' : ' NOT NULL' ).
        ")\n" if $DEBUG > 2;
diff --git a/FS/FS/detail_format.pm b/FS/FS/detail_format.pm
index 665afdb..2417b3a 100644
--- a/FS/FS/detail_format.pm
+++ b/FS/FS/detail_format.pm
@@ -70,7 +70,7 @@ sub new {
   my $language_name = $locale_info{'name'};
 
   my $self = { conf => FS::Conf->new(locale => $locale),
-               csv  => Text::CSV_XS->new,
+               csv  => Text::CSV_XS->new({ binary => 1 }),
                inbound  => ($opt{'inbound'} ? 1 : 0),
                buffer   => ($opt{'buffer'} || []),
                _lh      => FS::L10N->get_handle($locale),

commit 5daa6b776da674c41a04a93bd7f7e8568829409b
Author: Mark Wells <mark at freeside.biz>
Date:   Tue Mar 11 15:40:44 2014 -0700

    restore Unclassified and Deprecated sections to config, from #27958

diff --git a/httemplate/config/config-view.cgi b/httemplate/config/config-view.cgi
index 1c9e719..a52c1e9 100644
--- a/httemplate/config/config-view.cgi
+++ b/httemplate/config/config-view.cgi
@@ -415,10 +415,11 @@ my @config_items = grep { !defined($locale) or $_->per_locale }
 my @deleteable = qw( invoice_latexreturnaddress invoice_htmlreturnaddress );
 my %deleteable = map { $_ => 1 } @deleteable;
 
-my @sections = qw(
-  required billing invoicing notification UI API self-service ticketing
-  network_monitoring username password session shell BIND telephony
-), '', 'deprecated';
+my @sections = (qw(
+    required billing invoicing notification UI API self-service ticketing
+    network_monitoring username password session shell BIND telephony
+  ), '', 'deprecated'
+);
 
 my %section_items = ();
 foreach my $section (@sections) {

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

Summary of changes:
 FS/FS/Record.pm                   |    8 ++++++--
 FS/FS/detail_format.pm            |    2 +-
 httemplate/config/config-view.cgi |    9 +++++----
 3 files changed, 12 insertions(+), 7 deletions(-)




More information about the freeside-commits mailing list