projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RT# 80555 freeside_upgrade for invalid ip addresses
[freeside.git]
/
FS
/
FS
/
svc_broadband.pm
diff --git
a/FS/FS/svc_broadband.pm
b/FS/FS/svc_broadband.pm
index
ce50a0c
..
1908ebb
100755
(executable)
--- a/
FS/FS/svc_broadband.pm
+++ b/
FS/FS/svc_broadband.pm
@@
-2,10
+2,11
@@
package FS::svc_broadband;
use base qw(
FS::svc_Radius_Mixin
FS::svc_Tower_Mixin
use base qw(
FS::svc_Radius_Mixin
FS::svc_Tower_Mixin
+ FS::svc_Torrus_Mixin
FS::svc_IP_Mixin
FS::MAC_Mixin
FS::svc_Common
FS::svc_IP_Mixin
FS::MAC_Mixin
FS::svc_Common
-
);
+);
use strict;
use vars qw($conf);
use strict;
use vars qw($conf);
@@
-102,6
+103,7
@@
sub table_info {
'display_weight' => 50,
'cancel_weight' => 70,
'ip_field' => 'ip_addr',
'display_weight' => 50,
'cancel_weight' => 70,
'ip_field' => 'ip_addr',
+ 'manual_require' => 1,
'fields' => {
'svcnum' => 'Service',
'description' => 'Descriptive label',
'fields' => {
'svcnum' => 'Service',
'description' => 'Descriptive label',
@@
-132,6
+134,7
@@
sub table_info {
#select_table => 'radius_group',
#select_key => 'groupnum',
#select_label => 'groupname',
#select_table => 'radius_group',
#select_key => 'groupnum',
#select_label => 'groupname',
+ disable_select => 1,
disable_inventory => 1,
multiple => 1,
},
disable_inventory => 1,
multiple => 1,
},
@@
-144,6
+147,7
@@
sub table_info {
type => 'search-svc_broadband',
disable_inventory => 1,
},
type => 'search-svc_broadband',
disable_inventory => 1,
},
+ 'serviceid' => 'Torrus serviceid', #but is should be hidden
},
};
}
},
};
}
@@
-363,6
+367,7
@@
sub check {
|| $self->ut_snumbern('rssi')
|| $self->ut_numbern('suid')
|| $self->ut_foreign_keyn('shared_svcnum', 'svc_broadband', 'svcnum')
|| $self->ut_snumbern('rssi')
|| $self->ut_numbern('suid')
|| $self->ut_foreign_keyn('shared_svcnum', 'svc_broadband', 'svcnum')
+ || $self->ut_textn('serviceid') #too lenient?
;
return $error if $error;
;
return $error if $error;
@@
-497,6
+502,11
@@
sub _upgrade_data {
#next SVC;
}
#next SVC;
}
+ require FS::Misc::FixIPFormat;
+ FS::Misc::FixIPFormat::fix_bad_addresses_in_table(
+ 'svc_broadband', 'svcnum', 'ip_addr',
+ );
+
'';
}
'';
}
@@
-519,4
+529,3
@@
FS::part_svc, schema.html from the base documentation.
=cut
1;
=cut
1;
-