[freeside-commits] branch master updated. 3c036f878548a8aab8ff88911a7b238e20d68bbe

Carl J. Adams-Collier cjac at 420.am
Thu Sep 18 11:56:09 PDT 2014


The branch, master has been updated
       via  3c036f878548a8aab8ff88911a7b238e20d68bbe (commit)
      from  d54644e17fc84f3853ca020ae68605e7900855fb (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 3c036f878548a8aab8ff88911a7b238e20d68bbe
Author: C.J. Adams-Collier <cjac at colliertech.org>
Date:   Thu Sep 18 11:56:02 2014 -0700

    FS RT #30831 - passing the ISO 3166-1 alpha-2 country code to ut_phonen

diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm
index 4915b96..51cb6dc 100644
--- a/FS/FS/Record.pm
+++ b/FS/FS/Record.pm
@@ -2649,8 +2649,8 @@ sub ut_alpha_lower {
 Check/untaint phone numbers.  May be null.  If there is an error, returns
 the error, otherwise returns false.
 
-Takes an optional two-letter ISO country code; without it or with unsupported
-countries, ut_phonen simply calls ut_alphan.
+Takes an optional two-letter ISO 3166-1 alpha-2 country code; without
+it or with unsupported countries, ut_phonen simply calls ut_alphan.
 
 =cut
 
diff --git a/FS/FS/svc_alarm.pm b/FS/FS/svc_alarm.pm
index afb4c1d..808a5d3 100644
--- a/FS/FS/svc_alarm.pm
+++ b/FS/FS/svc_alarm.pm
@@ -197,13 +197,15 @@ sub check {
   my $x = $self->setfixed;
   return $x unless ref $x;
 
+  my $iso3166 = $self->cust_main->ship_location->country();
+
   my $error =
     $self->ut_numbern('svcnum')
     || $self->ut_text('acctnum')
     || $self->ut_alphan('_password')
     || $self->ut_textn('location')
     || $self->ut_numbern('cs_receiver')
-    || $self->ut_phonen('cs_phonenum')
+    || $self->ut_phonen('cs_phonenum', $iso3166)
     || $self->ut_alphan('serialnum')
     || $self->ut_foreign_key('alarmsystemnum',  'alarm_system',  'systemnum')
     || $self->ut_foreign_key('alarmtypenum',    'alarm_type',    'typenum')

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

Summary of changes:
 FS/FS/Record.pm    |    4 ++--
 FS/FS/svc_alarm.pm |    4 +++-
 2 files changed, 5 insertions(+), 3 deletions(-)




More information about the freeside-commits mailing list