summaryrefslogtreecommitdiff
path: root/fml/lib/FML/ML
diff options
context:
space:
mode:
authorfukachan <fukachan>2008-09-14 11:45:39 +0000
committerfukachan <fukachan>2008-09-14 11:45:39 +0000
commit2ed90509900b028fa1c51b86c43e2da3667f3edd (patch)
tree2eb0c0f8f13bf84d1ef439972b87b7aea6b36606 /fml/lib/FML/ML
parent46da968537d84fcdccd856ea5627e2da094d6fb3 (diff)
downloadfml8-2ed90509900b028fa1c51b86c43e2da3667f3edd.tar.gz
fml8-2ed90509900b028fa1c51b86c43e2da3667f3edd.tar.bz2
fml8-2ed90509900b028fa1c51b86c43e2da3667f3edd.zip
fix admin.cgi removing operation bug.
count up the number of valid ml, remove admin.cgi only if ensured that no more valid ml exists.
Diffstat (limited to 'fml/lib/FML/ML')
-rw-r--r--fml/lib/FML/ML/Control.pm11
1 files changed, 9 insertions, 2 deletions
diff --git a/fml/lib/FML/ML/Control.pm b/fml/lib/FML/ML/Control.pm
index e7993917..46785851 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.20 2008/09/12 11:43:03 fukachan Exp $
+# $FML: Control.pm,v 1.21 2008/09/13 10:53:15 fukachan Exp $
#
package FML::ML::Control;
@@ -495,7 +495,14 @@ sub delete_cgi_interface
my ($self, $curproc, $command_context, $params) = @_;
my $config = $curproc->config();
- $self->_cgi_setup($curproc, $params, "deinstall", "admin");
+ my $valid_ml_list = $curproc->ml_name_list();
+ my $num_ml_list = $#$valid_ml_list + 1;
+
+ # XXX already ml_home_dir is removed. so, th null list means no valid ml.
+ unless (@$valid_ml_list) {
+ # no more valid ml. so, remove admin.cgi, too.
+ $self->_cgi_setup($curproc, $params, "deinstall", "admin");
+ }
$self->_cgi_setup($curproc, $params, "deinstall", "ml-admin");
$self->_cgi_setup($curproc, $params, "deinstall", "ml-anonymous");
}