[freeside-commits] branch master updated. 7ff3a40dfb8e6d5cc15e87346f447b1d6806e39c
Mark Wells
mark at 420.am
Tue Aug 12 13:47:18 PDT 2014
The branch, master has been updated
via 7ff3a40dfb8e6d5cc15e87346f447b1d6806e39c (commit)
from 898373c17b6489ab1971bccc692323aa52b8900e (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 7ff3a40dfb8e6d5cc15e87346f447b1d6806e39c
Author: Mark Wells <mark at freeside.biz>
Date: Tue Aug 12 13:46:44 2014 -0700
fix router/block unlinking, #29829, from #20742
diff --git a/FS/FS/router.pm b/FS/FS/router.pm
index 21011e7..4011bb0 100755
--- a/FS/FS/router.pm
+++ b/FS/FS/router.pm
@@ -114,7 +114,7 @@ sub replace {
my $error = $self->SUPER::replace($old, @_);
return $error if $error;
- if ( defined($self->blocknum) ) {
+ if ( length($self->blocknum) ) {
#warn "FS::router::replace: blocknum = ".$self->blocknum."\n";
# then release any blocks we're already holding
foreach my $block ($self->addr_block) {
diff --git a/httemplate/edit/process/svc_acct.cgi b/httemplate/edit/process/svc_acct.cgi
index ca614cb..9cac2c5 100755
--- a/httemplate/edit/process/svc_acct.cgi
+++ b/httemplate/edit/process/svc_acct.cgi
@@ -102,10 +102,14 @@ if ( ! $error ) {
map { $_ => $cgi->param("router_$_") }
qw( routernum routername blocknum )
});
- if (length($router->routername == 0)) {
+ if (length($router->routername) == 0) {
#sensible default
$router->set('routername', $new->label);
}
+ if (length($router->blocknum) == 0) {
+ #unset it
+ $router->set('blocknum', 0);
+ }
push @child_objects, $router;
}
-----------------------------------------------------------------------
Summary of changes:
FS/FS/router.pm | 2 +-
httemplate/edit/process/svc_acct.cgi | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
More information about the freeside-commits
mailing list