From: khoff Date: Fri, 31 May 2002 00:22:09 +0000 (+0000) Subject: updated hashes 'n stuff for FS::part_export::sqlmail X-Git-Tag: freeside_1_4_0_pre14~53 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=bbbdd40d71fa66405224872a173a080a7a7dbfef updated hashes 'n stuff for FS::part_export::sqlmail --- diff --git a/FS/FS/part_export.pm b/FS/FS/part_export.pm index 08e436da0..14e4676e9 100644 --- a/FS/FS/part_export.pm +++ b/FS/FS/part_export.pm @@ -370,7 +370,8 @@ sub rebless { my $self = shift; my $exporttype = $self->exporttype; my $class = ref($self). "::$exporttype"; - eval "use $class;" or die $@; +# eval "use $class;" or die $@; + eval "use $class;"; bless($self, $class); } @@ -465,6 +466,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 +552,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... @@ -584,6 +596,14 @@ tie my %bind_slave_options, 'Tie::IxHash', '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' => { 'desc' => 'Real-time export to Cyrus IMAP server', 'options' => \%cyrus_options, @@ -627,12 +647,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' => {},