X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fpart_export.pm;h=f4f46b0e9c774c065ced3305e06438dd757166ef;hp=89625420e681eb549d3e585f855166df411592eb;hb=19416b51cad45853a7cf620af6bbde7973bedbe5;hpb=ee1a01a4d001bf993b9cce54e59f119db20e49f0 diff --git a/FS/FS/part_export.pm b/FS/FS/part_export.pm index 89625420e..f4f46b0e9 100644 --- a/FS/FS/part_export.pm +++ b/FS/FS/part_export.pm @@ -370,7 +370,7 @@ sub rebless { my $self = shift; my $exporttype = $self->exporttype; my $class = ref($self). "::$exporttype"; - eval "use $class;"; + eval "use $class;" or die $@; bless($self, $class); } @@ -465,6 +465,12 @@ Returns the applicable I for an I. =cut +# This subroutine should be modified or removed. In its present form, it +# imposes the arbitrary restriction that no export type can be associated +# with more than one svcdb. The only place it's used is in edit/part_svc.cgi +# to generate the list of allowed exports, which can be done more cleanly by +# export_info anyway. + sub exporttype2svcdb { my $exporttype = $_[0]; foreach my $svcdb ( keys %exports ) { @@ -545,6 +551,11 @@ tie my %bind_slave_options, 'Tie::IxHash', default => '/etc/bind/named.conf' }, ; +tie my %sqlmail_options, 'Tie::IxHash', + 'datasrc' => { label=>'DBI data source' }, + 'username' => { label=>'Database username' }, + 'password' => { label=>'Database password' }, +; #export names cannot have dashes... @@ -581,7 +592,15 @@ tie my %bind_slave_options, 'Tie::IxHash', 'desc' => 'Real-time export to SQL-backed RADIUS (ICRADIUS, FreeRADIUS)', 'options' => \%sqlradius_options, 'nodomain' => 'Y', - 'notes' => 'Real-time export of radcheck, radreply and usergroup tables to any SQL database for FreeRADIUS or ICRADIUS. Use freeside-sqlradius-reset to delete and repopulate the tables from the Freeside database. See the DBI documentation and the documentation for your DBD for the exact syntax of a DBI data source.', + 'notes' => 'Real-time export of radcheck, radreply and usergroup tables to any SQL database for FreeRADIUS or ICRADIUS. Use freeside-sqlradius-reset to delete and repopulate the tables from the Freeside database. See the DBI documentation and the documentation for your DBD for the exact syntax of a DBI data source. If using FreeRADIUS 0.5 or above, make sure your op fields are set to allow NULL values.', + }, + + 'sqlmail' => { + 'desc' => 'Real-time export to SQL-backed mail server', + 'options' => \%sqlmail_options, + 'nodomain' => 'Y', + 'notes' => 'Database schema can be made to work with Courier IMAP and + Exim. Others could work but are untested.', }, 'cyrus' => { @@ -627,12 +646,28 @@ tie my %bind_slave_options, 'Tie::IxHash', 'notes' => 'bind export notes (secondary munge) File::Rsync dependancy, run bind.export', }, + 'sqlmail' => { + 'desc' => 'Real-time export to SQL-backed mail server', + 'options' => \%sqlmail_options, + 'nodomain' => 'Y', + 'notes' => 'Database schema can be made to work with Courier IMAP and + Exim. Others could work but are untested.', + }, + }, 'svc_acct_sm' => {}, - 'svc_forward' => {}, + 'svc_forward' => { + 'sqlmail' => { + 'desc' => 'Real-time export to SQL-backed mail server', + 'options' => \%sqlmail_options, + 'nodomain' => 'Y', + 'notes' => 'Database schema can be made to work with Courier IMAP and + Exim. Others could work but are untested.', + }, + }, 'svc_www' => {},