[freeside-commits] branch master updated. 68cd93a81814d8725118a66b54f20e2c2c1c20f0

Mark Wells mark at 420.am
Sat Mar 17 15:01:33 PDT 2012


The branch, master has been updated
       via  68cd93a81814d8725118a66b54f20e2c2c1c20f0 (commit)
      from  4745efea9b2308b1fba8a8180a1a0b5da2986794 (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 68cd93a81814d8725118a66b54f20e2c2c1c20f0
Author: Mark Wells <mark at freeside.biz>
Date:   Sat Mar 17 15:01:19 2012 -0700

    freeside-upgrade fixes related to #14698 and #15017

diff --git a/FS/FS/part_export/sqlradius.pm b/FS/FS/part_export/sqlradius.pm
index 752bf12..910346b 100644
--- a/FS/FS/part_export/sqlradius.pm
+++ b/FS/FS/part_export/sqlradius.pm
@@ -1185,7 +1185,10 @@ SELECT groupname, attribute, op, value, \'R\' FROM radgroupreply';
         'priority'  => 1,
       };
       $error = $radius_group->insert;
-      return "error inserting group $groupname: $error" if $error;
+      if ( $error ) {
+        warn "error inserting group $groupname: $error";
+        next;#don't continue trying to insert the attribute
+      }
       $attrs_of{$groupname} = {};
       $groupnum_of{$groupname} = $radius_group->groupnum;
     }
@@ -1202,7 +1205,10 @@ SELECT groupname, attribute, op, value, \'R\' FROM radgroupreply';
         'value' => $value,
       };
       $error = $new->replace($old);
-      return "error modifying attr $attrname: $error" if $error;
+      if ( $error ) {
+        warn "error modifying attr $attrname: $error";
+        next;
+      }
     }
     else {
       $new = new FS::radius_attr {
@@ -1213,7 +1219,10 @@ SELECT groupname, attribute, op, value, \'R\' FROM radgroupreply';
         'value'    => $value,
       };
       $error = $new->insert;
-      return "error inserting attr $attrname: $error" if $error;
+      if ( $error ) {
+        warn "error inserting attr $attrname: $error" if $error;
+        next;
+      }
     }
     $attrs_of{$groupname}->{$attrname} = $new;
   } #foreach $row
diff --git a/FS/FS/radius_attr.pm b/FS/FS/radius_attr.pm
index 51b1bab..cc03b4d 100644
--- a/FS/FS/radius_attr.pm
+++ b/FS/FS/radius_attr.pm
@@ -195,7 +195,7 @@ check or R for reply.
 =cut
 
 my %ops = (
-  C => [ '==', ':=', '+=', '!=', '>', '>=', '<', '<=', '=~', '!~', '=*', '!*' ],
+  C => [ '=', '==', ':=', '+=', '!=', '>', '>=', '<', '<=', '=~', '!~', '=*', '!*' ],
   R => [ '=', ':=', '+=' ],
 );
 
diff --git a/FS/FS/svc_broadband.pm b/FS/FS/svc_broadband.pm
index 212a4bf..e9917ff 100755
--- a/FS/FS/svc_broadband.pm
+++ b/FS/FS/svc_broadband.pm
@@ -421,7 +421,7 @@ sub check {
   
     my $router = $self->router;
     return "Router ".$self->routernum." does not serve this customer"
-      if $router->agentnum and $router->agentnum != $agentnum;
+      if $router->agentnum and $agentnum and $router->agentnum != $agentnum;
 
     if ( $router->manual_addr ) {
       $self->blocknum('');
@@ -599,7 +599,7 @@ sub allowed_routers {
   my $self = shift;
   my $svcpart = $self->svcnum ? $self->cust_svc->svcpart : $self->svcpart;
   my @r = map { $_->router } qsearch('part_svc_router', 
-    { svcpart => $self->cust_svc->svcpart });
+    { svcpart => $svcpart });
   if ( $self->cust_main ) {
     my $agentnum = $self->cust_main->agentnum;
     return grep { !$_->agentnum or $_->agentnum == $agentnum } @r;
diff --git a/httemplate/view/svc_broadband.cgi b/httemplate/view/svc_broadband.cgi
index 131582f..75e673c 100644
--- a/httemplate/view/svc_broadband.cgi
+++ b/httemplate/view/svc_broadband.cgi
@@ -47,10 +47,11 @@ push @fields,
 
 sub router {
   my $svc = shift;
-  my $router = $svc->router or return '';
+  my $router = $svc->router;
   my $block = $svc->addr_block;
+  $router = $router->routernum . ': ' . $router->routername if $router;
   $block = '; '.$block->cidr if $block;
-  $router->routernum . ': ' . $router->routername . $block
+  $router . $block
 }
 
 sub ip_addr {

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

Summary of changes:
 FS/FS/part_export/sqlradius.pm    |   15 ++++++++++++---
 FS/FS/radius_attr.pm              |    2 +-
 FS/FS/svc_broadband.pm            |    4 ++--
 httemplate/view/svc_broadband.cgi |    5 +++--
 4 files changed, 18 insertions(+), 8 deletions(-)




More information about the freeside-commits mailing list