[freeside-commits] freeside/FS/FS svc_pbx.pm,1.4,1.5

Ivan,,, ivan at wavetail.420.am
Tue Jan 26 00:35:45 PST 2010


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv4385/FS/FS

Modified Files:
	svc_pbx.pm 
Log Message:
svc_pbx.title uniqueness (kludgy) and force to alphanumeric+space and 19 char max when using thirdlane (conservative guess for 1st pass implementation), RT#7051

Index: svc_pbx.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/svc_pbx.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- svc_pbx.pm	26 Jan 2010 08:18:15 -0000	1.4
+++ svc_pbx.pm	26 Jan 2010 08:35:43 -0000	1.5
@@ -2,7 +2,7 @@
 
 use strict;
 use base qw( FS::svc_External_Common );
-#use FS::Record qw( qsearch qsearchs );
+use FS::Record qw( qsearchs ); # qsearch );
 use FS::cust_svc;
 
 =head1 NAME
@@ -214,6 +214,21 @@
   $self->SUPER::check;
 }
 
+#XXX this is a way-too simplistic implementation
+# at the very least, title should be unique across exports that need that or
+# controlled by a conf setting or something
+sub _check_duplicate {
+  my $self = shift;
+
+  $self->lock_table;
+
+  if ( qsearchs( 'svc_pbx', { 'title' => $self->title } ) ) {
+    return "Name in use";
+  } else {
+    return '';
+  }
+}
+
 =back
 
 =head1 BUGS



More information about the freeside-commits mailing list