[freeside-commits] branch FREESIDE_3_BRANCH updated. bd876bcd42a0ce8d1e44d87ba6c517cf6106ca37
Mark Wells
mark at 420.am
Tue Aug 12 13:47:17 PDT 2014
The branch, FREESIDE_3_BRANCH has been updated
via bd876bcd42a0ce8d1e44d87ba6c517cf6106ca37 (commit)
from c82ae54183494e5f26c72ad2f068782fd1bb91e7 (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 bd876bcd42a0ce8d1e44d87ba6c517cf6106ca37
Author: Mark Wells <mark at freeside.biz>
Date: Tue Aug 12 13:46:22 2014 -0700
fix router/block unlinking, #29829, from #20742
diff --git a/FS/FS/router.pm b/FS/FS/router.pm
index 937dc1f..b3efa3b 100755
--- a/FS/FS/router.pm
+++ b/FS/FS/router.pm
@@ -116,7 +116,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