[freeside-commits] freeside/FS/FS svc_pbx.pm, 1.1.2.7, 1.1.2.8 Conf.pm, 1.324.2.38, 1.324.2.39
Ivan,,,
ivan at wavetail.420.am
Mon Jun 28 18:40:28 PDT 2010
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv23305
Modified Files:
Tag: FREESIDE_1_9_BRANCH
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.324.2.38
retrieving revision 1.324.2.39
diff -u -w -d -r1.324.2.38 -r1.324.2.39
--- Conf.pm 23 Jun 2010 08:38:58 -0000 1.324.2.38
+++ Conf.pm 29 Jun 2010 01:40:26 -0000 1.324.2.39
@@ -2180,6 +2180,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.1.2.7
retrieving revision 1.1.2.8
diff -u -w -d -r1.1.2.7 -r1.1.2.8
--- svc_pbx.pm 26 Jan 2010 10:40:33 -0000 1.1.2.7
+++ svc_pbx.pm 29 Jun 2010 01:40:26 -0000 1.1.2.8
@@ -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;
@@ -253,6 +254,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