[freeside-commits] branch FREESIDE_2_3_BRANCH updated. 311711639b41a5b307243d99c1aefceadcc97548
Ivan
ivan at 420.am
Sun Nov 17 21:52:49 PST 2013
The branch, FREESIDE_2_3_BRANCH has been updated
via 311711639b41a5b307243d99c1aefceadcc97548 (commit)
from de5f80923239117a9ab328a79b38e50de761affa (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 311711639b41a5b307243d99c1aefceadcc97548
Author: Ivan Kohler <ivan at freeside.biz>
Date: Sun Nov 17 21:52:47 2013 -0800
svc_cable label, RT#26013
diff --git a/FS/FS/svc_broadband.pm b/FS/FS/svc_broadband.pm
index 5b69127..df5a438 100755
--- a/FS/FS/svc_broadband.pm
+++ b/FS/FS/svc_broadband.pm
@@ -1,9 +1,14 @@
package FS::svc_broadband;
+use base qw(
+ FS::svc_Radius_Mixin
+ FS::svc_Tower_Mixin
+ FS::svc_MAC_Mixin
+ FS::svc_Common
+ );
use strict;
use vars qw(@ISA $conf);
-use base qw(FS::svc_Radius_Mixin FS::svc_Tower_Mixin FS::svc_Common);
{ no warnings 'redefine'; use NetAddr::IP; }
use FS::Record qw( qsearchs qsearch dbh );
use FS::svc_Common;
@@ -307,7 +312,7 @@ sub search_sql {
=item label
-Returns the IP address.
+Returns the IP address, MAC address and description.
=cut
@@ -631,22 +636,6 @@ sub allowed_routers {
=back
-=item mac_addr_formatted CASE DELIMITER
-
-Format the MAC address (for use by exports). If CASE starts with "l"
-(for "lowercase"), it's returned in lowercase. DELIMITER is inserted
-between octets.
-
-=cut
-
-sub mac_addr_formatted {
- my $self = shift;
- my ($case, $delim) = @_;
- my $addr = $self->mac_addr;
- $addr = lc($addr) if $case =~ /^l/i;
- join( $delim || '', $addr =~ /../g );
-}
-
#class method
sub _upgrade_data {
my $class = shift;
diff --git a/FS/FS/svc_cable.pm b/FS/FS/svc_cable.pm
index 26f4c89..726e6c3 100644
--- a/FS/FS/svc_cable.pm
+++ b/FS/FS/svc_cable.pm
@@ -1,5 +1,7 @@
package FS::svc_cable;
-use base qw( FS::svc_Common ); #qw( FS::device_Common FS::svc_Common );
+use base qw( FS::svc_MAC_Mixin
+ FS::svc_Common
+ ); #FS::device_Common
use strict;
use Tie::IxHash;
@@ -115,6 +117,22 @@ sub table_info {
};
}
+=item label
+
+Returns the MAC address and serial number.
+
+=cut
+
+sub label {
+ my $self = shift;
+ my @label = ();
+ push @label, 'MAC:'. $self->mac_addr_pretty
+ if $self->mac_addr;
+ push @label, 'Serial#:'. $self->serialnum
+ if $self->serialnum;
+ return join(', ', @label);
+}
+
=item insert
Adds this record to the database. If there is an error, returns the error,
-----------------------------------------------------------------------
Summary of changes:
FS/FS/svc_broadband.pm | 25 +++++++------------------
FS/FS/svc_cable.pm | 20 +++++++++++++++++++-
2 files changed, 26 insertions(+), 19 deletions(-)
More information about the freeside-commits
mailing list