[freeside-commits] branch FREESIDE_2_3_BRANCH updated. 631e1def5b34f6f5c63403c93c07f7bcb1346265
Mark Wells
mark at 420.am
Sat Mar 17 15:01:47 PDT 2012
The branch, FREESIDE_2_3_BRANCH has been updated
via 631e1def5b34f6f5c63403c93c07f7bcb1346265 (commit)
from 2e33262fc7e69f64217d35316e0b45955e1838d6 (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 631e1def5b34f6f5c63403c93c07f7bcb1346265
Author: Mark Wells <mark at freeside.biz>
Date: Sat Mar 17 14:59:20 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 43a0dcd..668a3cf 100755
--- a/FS/FS/svc_broadband.pm
+++ b/FS/FS/svc_broadband.pm
@@ -420,7 +420,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('');
@@ -598,7 +598,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