[freeside-commits] freeside/FS/FS svc_pbx.pm,1.1.2.5,1.1.2.6
Ivan,,,
ivan at wavetail.420.am
Tue Jan 26 00:35:46 PST 2010
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv4394/FS/FS
Modified Files:
Tag: FREESIDE_1_9_BRANCH
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.1.2.5
retrieving revision 1.1.2.6
diff -u -d -r1.1.2.5 -r1.1.2.6
--- svc_pbx.pm 26 Jan 2010 08:18:16 -0000 1.1.2.5
+++ svc_pbx.pm 26 Jan 2010 08:35:44 -0000 1.1.2.6
@@ -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