summaryrefslogtreecommitdiff
path: root/fml
diff options
context:
space:
mode:
authorfukachan <fukachan>2008-09-09 08:30:11 +0000
committerfukachan <fukachan>2008-09-09 08:30:11 +0000
commit2e1f4383e1feb07cf1ef5234b39df06f52bc0f03 (patch)
tree591e08ec20542b2f7b29255e9e270d0aed341d68 /fml
parentf9288cc5743c1f13ac23edec913f06311ef6fb38 (diff)
downloadfml8-2e1f4383e1feb07cf1ef5234b39df06f52bc0f03.tar.gz
fml8-2e1f4383e1feb07cf1ef5234b39df06f52bc0f03.tar.bz2
fml8-2e1f4383e1feb07cf1ef5234b39df06f52bc0f03.zip
in setting up cgi, install cgi script(s) for anonymous users, too.
Diffstat (limited to 'fml')
-rw-r--r--fml/lib/FML/ML/Control.pm36
1 files changed, 29 insertions, 7 deletions
diff --git a/fml/lib/FML/ML/Control.pm b/fml/lib/FML/ML/Control.pm
index ee6d1a09..d5cdd20a 100644
--- a/fml/lib/FML/ML/Control.pm
+++ b/fml/lib/FML/ML/Control.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: Control.pm,v 1.16 2007/01/13 14:18:26 fukachan Exp $
+# $FML: Control.pm,v 1.17 2008/06/28 21:16:12 fukachan Exp $
#
package FML::ML::Control;
@@ -454,11 +454,13 @@ sub setup_cgi_interface
#
# 1. create directory path if needed
#
- my (%is_dir_exists) = ();
- my $cgi_base_dir = $config->{ cgi_base_dir };
- my $admin_cgi_dir = $config->{ admin_cgi_base_dir };
- my $ml_admin_cgi_dir = $config->{ ml_admin_cgi_base_dir };
- for my $dir ($cgi_base_dir, $admin_cgi_dir, $ml_admin_cgi_dir) {
+ my (%is_dir_exists) = ();
+ my $cgi_base_dir = $config->{ cgi_base_dir };
+ my $admin_cgi_dir = $config->{ admin_cgi_base_dir };
+ my $ml_admin_cgi_dir = $config->{ ml_admin_cgi_base_dir };
+ my $ml_anonymous_cgi_dir = $config->{ ml_anonymous_cgi_base_dir };
+ for my $dir ($cgi_base_dir, $admin_cgi_dir, $ml_admin_cgi_dir,
+ $ml_anonymous_cgi_dir) {
unless (-d $dir) {
$curproc->ui_message("creating $dir");
$is_dir_exists{ $dir } = 0;
@@ -516,7 +518,6 @@ sub setup_cgi_interface
}
}
- #
# 3.2. install ml-admin/
{
# hints
@@ -539,6 +540,27 @@ sub setup_cgi_interface
chmod 0755, $dst;
}
}
+
+ # 3.3. install cgi script(s) for anonymous users.
+ {
+ use File::Spec;
+ my $submit = File::Spec->catfile($ml_anonymous_cgi_dir, 'submit.cgi');
+
+ # hints
+ $params->{ __hints_for_fml_process__ } = qq{
+ \$hints = {
+ cgi_mode => 'anonymous',
+ ml_name => '$ml_name',
+ ml_domain => '$ml_domain',
+ };
+ };
+
+ for my $dst ($submit) {
+ $curproc->ui_message("creating $dst");
+ $self->_install($src, $dst, $params);
+ chmod 0755, $dst;
+ }
+ }
}