[freeside-commits] branch FREESIDE_2_3_BRANCH updated. 7f6ec803e44fd8152ae446f7c1341bce9bde3d6f

Mark Wells mark at 420.am
Tue Feb 26 21:18:46 PST 2013


The branch, FREESIDE_2_3_BRANCH has been updated
       via  7f6ec803e44fd8152ae446f7c1341bce9bde3d6f (commit)
      from  9522160ccc5308b8dcd09e85925382532ed3274e (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 7f6ec803e44fd8152ae446f7c1341bce9bde3d6f
Author: Mark Wells <mark at freeside.biz>
Date:   Tue Feb 26 21:17:35 2013 -0800

    strip _ out of MAC address fields, #19114

diff --git a/FS/FS/svc_broadband.pm b/FS/FS/svc_broadband.pm
index 46d046c..2008dba 100755
--- a/FS/FS/svc_broadband.pm
+++ b/FS/FS/svc_broadband.pm
@@ -376,7 +376,7 @@ sub check {
 
   # remove delimiters
   my $mac_addr = uc($self->get('mac_addr'));
-  $mac_addr =~ s/[-: ]//g;
+  $mac_addr =~ s/[\W_]//g;
   $self->set('mac_addr', $mac_addr);
 
   my $error =
diff --git a/FS/FS/svc_hardware.pm b/FS/FS/svc_hardware.pm
index af6865f..96502e4 100644
--- a/FS/FS/svc_hardware.pm
+++ b/FS/FS/svc_hardware.pm
@@ -164,7 +164,7 @@ sub check {
   return $x unless ref $x;
 
   my $hw_addr = $self->getfield('hw_addr');
-  $hw_addr = join('', split(/\W/, $hw_addr));
+  $hw_addr = join('', split(/[_\W]/, $hw_addr));
   if ( $conf->exists('svc_hardware-check_mac_addr') ) {
     $hw_addr = uc($hw_addr);
     $hw_addr =~ /^[0-9A-F]{12}$/ 

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

Summary of changes:
 FS/FS/svc_broadband.pm |    2 +-
 FS/FS/svc_hardware.pm  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)




More information about the freeside-commits mailing list