summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfukachan <fukachan>2002-06-25 04:02:11 +0000
committerfukachan <fukachan>2002-06-25 04:02:11 +0000
commit95b76fc4fab1c717c60680c535012669e64d69ee (patch)
treeb96c91965314a157daf60ec96b694005243efb1a
parent6443714bf831687dfc26506a5dacbad4474bd46d (diff)
downloadfml8-95b76fc4fab1c717c60680c535012669e64d69ee.tar.gz
fml8-95b76fc4fab1c717c60680c535012669e64d69ee.tar.bz2
fml8-95b76fc4fab1c717c60680c535012669e64d69ee.zip
get_recipient_list() -> get_address_list( $map )
-rw-r--r--fml/lib/FML/CGI/Admin/User.pm26
-rw-r--r--fml/lib/FML/Process/Utils.pm16
2 files changed, 23 insertions, 19 deletions
diff --git a/fml/lib/FML/CGI/Admin/User.pm b/fml/lib/FML/CGI/Admin/User.pm
index 2bfbc136..e3e3e654 100644
--- a/fml/lib/FML/CGI/Admin/User.pm
+++ b/fml/lib/FML/CGI/Admin/User.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: User.pm,v 1.7 2002/04/25 04:15:19 fukachan Exp $
+# $FML: User.pm,v 1.8 2002/06/24 11:06:11 fukachan Exp $
#
package FML::CGI::Admin::User;
@@ -38,20 +38,24 @@ sub new
sub cgi_menu
{
my ($self, $curproc, $args, $command_args) = @_;
- my $action = $curproc->myname();
- my $target = '_top';
- my $ml_list = $curproc->get_ml_list($args);
- my $address = $curproc->safe_param_address() || '';
- my $config = $curproc->{ config };
-
- #
- my $address_list = $curproc->get_recipient_list();
+ my $action = $curproc->myname();
+ my $target = '_top';
+ my $ml_list = $curproc->get_ml_list($args);
+ my $address = $curproc->safe_param_address() || '';
+ my $config = $curproc->{ config };
my $ml_name = $command_args->{ ml_name };
my $comname = $command_args->{ comname };
- my $command_list =
- $config->get_as_array_ref('commands_for_admin_cgi');
+ my $address_list = [];
+ # prepare address list to show them at the scrolling list
+ if ($comname eq 'subscribe' || $comname eq 'unsubscribe') {
+ $address_list = $curproc->get_address_list( 'member_maps' );
+ }
+ elsif ($comname eq 'addadmin' || $comname eq 'byeadmin') {
+ $address_list = $curproc->get_address_list( 'admin_member_maps' );
+ }
+ # create <FORM ... > ... by (start_form() ... end_form())
print start_form(-action=>$action, -target=>$target);
print table( { -border => undef },
diff --git a/fml/lib/FML/Process/Utils.pm b/fml/lib/FML/Process/Utils.pm
index 30dbc003..7457a4e3 100644
--- a/fml/lib/FML/Process/Utils.pm
+++ b/fml/lib/FML/Process/Utils.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: Utils.pm,v 1.27 2002/06/24 09:42:52 fukachan Exp $
+# $FML: Utils.pm,v 1.28 2002/06/24 13:40:07 fukachan Exp $
#
package FML::Process::Utils;
@@ -602,22 +602,22 @@ sub get_ml_list
}
-=head2 get_recipient_list()
+=head2 get_address_list( $map )
-get HASH ARRAY of valid mailing lists.
+get HASH ARRAY of address list for the specified map.
=cut
-# Descriptions: list up recipients list
-# Arguments: OBJ($curproc) HASH_REF($args)
+# Descriptions: get address list for the specified map
+# Arguments: OBJ($curproc) STR($map)
# Side Effects: none
# Return Value: ARRAY_REF
-sub get_recipient_list
+sub get_address_list
{
- my ($curproc) = @_;
+ my ($curproc, $map) = @_;
my $config = $curproc->{ config };
- my $list = $config->get_as_array_ref( 'recipient_maps' );
+ my $list = $config->get_as_array_ref( $map );
eval q{ use IO::Adapter;};
unless ($@) {