summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfukachan <fukachan>2002-06-21 09:28:12 +0000
committerfukachan <fukachan>2002-06-21 09:28:12 +0000
commitdd9293bb706e8b67d2edf0f453372786ac8abd36 (patch)
treee4f3c942420af9b29fa42c2ae3333472a7c1a037
parent69620f55ef2dea8025ec13e5accd83cb93fed171 (diff)
downloadfml8-dd9293bb706e8b67d2edf0f453372786ac8abd36.tar.gz
fml8-dd9293bb706e8b67d2edf0f453372786ac8abd36.tar.bz2
fml8-dd9293bb706e8b67d2edf0f453372786ac8abd36.zip
set up $ml_name dynamically
-rw-r--r--fml/lib/FML/CGI/Admin/Menu.pm7
-rw-r--r--fml/lib/FML/Command/Admin/newml.pm8
2 files changed, 10 insertions, 5 deletions
diff --git a/fml/lib/FML/CGI/Admin/Menu.pm b/fml/lib/FML/CGI/Admin/Menu.pm
index 726674cf..ffe658a2 100644
--- a/fml/lib/FML/CGI/Admin/Menu.pm
+++ b/fml/lib/FML/CGI/Admin/Menu.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: Menu.pm,v 1.9 2002/04/23 09:32:35 fukachan Exp $
+# $FML: Menu.pm,v 1.13 2002/04/25 04:15:19 fukachan Exp $
#
package FML::CGI::Admin::Menu;
@@ -107,10 +107,14 @@ sub html_end
sub run_cgi_main
{
my ($curproc, $args) = @_;
+ my $config = $curproc->{ config };
my $command = $curproc->safe_param_command() || '';
my $address = $curproc->cgi_try_get_address($args);
my $ml_name = $curproc->cgi_try_get_ml_name($args);
+ # update config on memory
+ $config->set('ml_name', $ml_name);
+
if (($command eq 'newml' && $ml_name) ||
($command eq 'rmml' && $ml_name)) {
my $command_args = {
@@ -122,6 +126,7 @@ sub run_cgi_main
argv => undef,
args => undef,
};
+
$curproc->cgi_execute_command($args, $command_args);
print hr;
diff --git a/fml/lib/FML/Command/Admin/newml.pm b/fml/lib/FML/Command/Admin/newml.pm
index 57ffd57b..735d72c6 100644
--- a/fml/lib/FML/Command/Admin/newml.pm
+++ b/fml/lib/FML/Command/Admin/newml.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: newml.pm,v 1.39 2002/06/01 05:02:32 fukachan Exp $
+# $FML: newml.pm,v 1.40 2002/06/01 05:09:23 fukachan Exp $
#
package FML::Command::Admin::newml;
@@ -70,8 +70,8 @@ sub process
my $config = $curproc->{ 'config' };
my $ml_name = $config->{ ml_name };
my $ml_domain = $config->{ ml_domain };
- my $ml_home_prefix = $config->{ ml_home_prefix };
- my $ml_home_dir = $config->{ ml_home_dir };
+ my $ml_home_prefix = $curproc->ml_home_prefix();
+ my $ml_home_dir = $curproc->ml_home_dir($ml_name);
my $params = {
fml_owner => $curproc->fml_owner(),
executable_prefix => $curproc->executable_prefix(),
@@ -92,7 +92,7 @@ sub process
# already exists.
unless (defined $options->{ force } ) {
if (-d $ml_home_dir) {
- warn("$ml_name already exists");
+ warn("$ml_name already exists ($ml_home_dir)");
return ;
}
}