diff options
author | ivan <ivan> | 2010-06-29 01:40:25 +0000 |
---|---|---|
committer | ivan <ivan> | 2010-06-29 01:40:25 +0000 |
commit | 4be4412e7846c82db85563d4915b3a31c5217f48 (patch) | |
tree | ec4f20dc78d2fadf97094411a2d7f17aa632c899 /FS | |
parent | aac306bf608d21e3e8e739285cf77e66c32aabde (diff) |
add global_unique-pbx_title to disable duplicate checking on svc_pbx.title
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/Conf.pm | 8 | ||||
-rw-r--r-- | FS/FS/svc_pbx.pm | 4 |
2 files changed, 12 insertions, 0 deletions
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 11658a8c1..cd2792b08 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -2194,6 +2194,14 @@ and customer address. Include units.', }, { + '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).', diff --git a/FS/FS/svc_pbx.pm b/FS/FS/svc_pbx.pm index 7c4385cde..d2760a504 100644 --- a/FS/FS/svc_pbx.pm +++ b/FS/FS/svc_pbx.pm @@ -3,6 +3,7 @@ package FS::svc_pbx; 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 { 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 } ) ) { |