[freeside-commits] freeside/FS/FS svc_pbx.pm, 1.8, 1.9 Conf.pm, 1.370, 1.371

Ivan,,, ivan at wavetail.420.am
Mon Jun 28 18:40:27 PDT 2010


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

Modified Files:
	svc_pbx.pm Conf.pm 
Log Message:
add global_unique-pbx_title to disable duplicate checking on svc_pbx.title

Index: Conf.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Conf.pm,v
retrieving revision 1.370
retrieving revision 1.371
diff -u -w -d -r1.370 -r1.371
--- Conf.pm	28 Jun 2010 08:12:01 -0000	1.370
+++ Conf.pm	29 Jun 2010 01:40:25 -0000	1.371
@@ -2194,6 +2194,14 @@
   },
 
   {
+    'key'         => 'global_unique-pbx_title',
+    'section'     => '',
+    'description' => 'Global phone number uniqueness control: enabled (usual setting - title must e unique), or disabled turns off duplicate checking for this field.',
+    'type'        => 'select',
+    'select_enum' => [ 'enabled', 'disabled' ],
+  },
+
+  {
     'key'         => 'svc_external-skip_manual',
     'section'     => 'UI',
     'description' => 'When provisioning svc_external services, skip manual entry of id and title fields in the UI.  Usually used in conjunction with an export that populates these fields (i.e. artera_turbo).',

Index: svc_pbx.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/svc_pbx.pm,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -w -d -r1.8 -r1.9
--- svc_pbx.pm	28 Jun 2010 08:13:12 -0000	1.8
+++ svc_pbx.pm	29 Jun 2010 01:40:24 -0000	1.9
@@ -3,6 +3,7 @@
 use strict;
 use base qw( FS::svc_External_Common );
 use FS::Record qw( qsearch qsearchs dbh );
+use FS::Conf;
 use FS::cust_svc;
 use FS::svc_phone;
 use FS::svc_acct;
@@ -258,6 +259,9 @@
 sub _check_duplicate {
   my $self = shift;
 
+  my $conf = new FS::Conf;
+  return '' if $conf->config('global_unique-pbx_title') eq 'disabled';
+
   $self->lock_table;
 
   if ( qsearchs( 'svc_pbx', { 'title' => $self->title } ) ) {



More information about the freeside-commits mailing list