summaryrefslogtreecommitdiff
path: root/fml
diff options
context:
space:
mode:
authorfukachan <fukachan>2005-06-04 08:12:15 +0000
committerfukachan <fukachan>2005-06-04 08:12:15 +0000
commitd115ae4f6b457f7cc9d9f3114ffb56e3019e20a3 (patch)
tree2f532e12cdd6b965822b2d4ca81ad9ccc458caf9 /fml
parente675bffc1359f43ee6db01ba1c4899d9172e90ed (diff)
downloadfml8-d115ae4f6b457f7cc9d9f3114ffb56e3019e20a3.tar.gz
fml8-d115ae4f6b457f7cc9d9f3114ffb56e3019e20a3.tar.bz2
fml8-d115ae4f6b457f7cc9d9f3114ffb56e3019e20a3.zip
moved get_address_list(), called only at this module, from
FML::Process::Utils to here. Also, it is changed to the private method; get_address_list() -> _get_address_list().
Diffstat (limited to 'fml')
-rw-r--r--fml/lib/FML/CGI/User.pm30
1 files changed, 25 insertions, 5 deletions
diff --git a/fml/lib/FML/CGI/User.pm b/fml/lib/FML/CGI/User.pm
index 2cc0bd71..1a1e9e30 100644
--- a/fml/lib/FML/CGI/User.pm
+++ b/fml/lib/FML/CGI/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.10 2004/07/23 13:16:33 fukachan Exp $
+# $FML: User.pm,v 1.11 2004/07/23 15:59:02 fukachan Exp $
#
package FML::CGI::User;
@@ -60,16 +60,16 @@ sub cgi_menu
$comname eq 'userdel' ||
$comname eq 'deluser' ||
$comname eq 'digeston') {
- $address_list = $curproc->get_address_list( 'recipient_maps' );
+ $address_list = $curproc->_get_address_list( 'recipient_maps' );
$selected_key = 'recipients';
}
elsif (0) {
- $address_list = $curproc->get_address_list( 'member_maps' );
+ $address_list = $curproc->_get_address_list( 'member_maps' );
$selected_key = 'members';
}
# XXX digest operatoins is asymmetric with *_maps.
elsif ($comname eq 'digestoff') {
- $address_list = $curproc->get_address_list( 'digest_recipient_maps' );
+ $address_list = $curproc->_get_address_list( 'digest_recipient_maps' );
$selected_key = 'digest_recipients';
}
elsif ($comname eq 'addadmin' ||
@@ -77,7 +77,7 @@ sub cgi_menu
$comname eq 'admindel' ||
$comname eq 'deladmin' ||
$comname eq 'byeadmin' ) {
- $address_list = $curproc->get_address_list( 'admin_member_maps' );
+ $address_list = $curproc->_get_address_list( 'admin_member_maps' );
$selected_key = 'admin_members';
}
else {
@@ -140,6 +140,26 @@ sub cgi_menu
}
+# Descriptions: get address list for the specified map.
+# Arguments: OBJ($curproc) STR($map)
+# Side Effects: none
+# Return Value: ARRAY_REF
+sub _get_address_list
+{
+ my ($curproc, $map) = @_;
+ my $config = $curproc->config();
+ my $list = $config->get_as_array_ref( $map );
+
+ eval q{ use FML::User::Control;};
+ unless ($@) {
+ my $obj = new FML::User::Control;
+ return $obj->get_user_list($curproc, $list);
+ }
+
+ return [];
+}
+
+
=head1 CODING STYLE
See C<http://www.fml.org/software/FNF/> on fml coding style guide.