[freeside-commits] freeside/FS/FS svc_broadband.pm,1.12,1.13
Jeff Finucane,420,,
jeff at wavetail.420.am
Wed Feb 13 15:49:39 PST 2008
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv14581/FS/FS
Modified Files:
svc_broadband.pm
Log Message:
svc_broadband MAC searches RT#2985
Index: svc_broadband.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/svc_broadband.pm,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- svc_broadband.pm 10 Mar 2007 00:11:50 -0000 1.12
+++ svc_broadband.pm 13 Feb 2008 23:49:37 -0000 1.13
@@ -114,6 +114,10 @@
my( $class, $string ) = @_;
if ( $string =~ /^(\d{1,3}\.){3}\d{1,3}$/ ) {
$class->search_sql_field('ip_addr', $string );
+ }elsif ( $string =~ /^([a-fA-F0-9]{12})$/ ) {
+ $class->search_sql_field('mac_addr', uc($string));
+ }elsif ( $string =~ /^(([a-fA-F0-9]{1,2}:){5}([a-fA-F0-9]{1,2}))$/ ) {
+ $class->search_sql_field('mac_addr', uc("$2$3$4$5$6$7") );
} else {
'1 = 0'; #false
}
More information about the freeside-commits
mailing list