summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfukachan <fukachan>2008-09-09 09:49:29 +0000
committerfukachan <fukachan>2008-09-09 09:49:29 +0000
commit6d2ca92566549ff5329e7ecd2c9256ff529b93ae (patch)
tree0c0a926dee4f63c80102aed571d27e8d4a97a5b9
parentb7254912f308a9649d0a12a18a4ed9edd5739431 (diff)
downloadfml8-6d2ca92566549ff5329e7ecd2c9256ff529b93ae.tar.gz
fml8-6d2ca92566549ff5329e7ecd2c9256ff529b93ae.tar.bz2
fml8-6d2ca92566549ff5329e7ecd2c9256ff529b93ae.zip
$commands_for_ml_admin_cgi -> $ml_admin_cgi_allowed_commands
ensure the return value for CGI action to be not "undef". menu is enhanced to handle both *admin.cgi and anonymous cgi case.
-rw-r--r--fml/lib/FML/Process/CGI/Utils.pm24
1 files changed, 17 insertions, 7 deletions
diff --git a/fml/lib/FML/Process/CGI/Utils.pm b/fml/lib/FML/Process/CGI/Utils.pm
index 7f4c86fe..28dcaaee 100644
--- a/fml/lib/FML/Process/CGI/Utils.pm
+++ b/fml/lib/FML/Process/CGI/Utils.pm
@@ -1,10 +1,10 @@
#-*- perl -*-
#
-# Copyright (C) 2003,2004,2005 Ken'ichi Fukamachi
+# Copyright (C) 2003,2004,2005,2008 Ken'ichi Fukamachi
# 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.15 2005/06/04 08:21:28 fukachan Exp $
+# $FML: Utils.pm,v 1.16 2005/06/04 08:51:29 fukachan Exp $
#
package FML::Process::CGI::Utils;
@@ -143,8 +143,7 @@ sub cgi_var_available_command_list
return $config->get_as_array_ref('admin_cgi_allowed_commands');
}
else {
- # XXX-TODO: commands_for_ml_admin_cgi -> ml_admin_cgi_allowed_commands
- return $config->get_as_array_ref('commands_for_ml_admin_cgi');
+ return $config->get_as_array_ref('ml_admin_cgi_allowed_commands');
}
}
@@ -156,7 +155,12 @@ sub cgi_var_available_command_list
sub cgi_var_action
{
my ($curproc) = @_;
- return $curproc->safe_cgi_action_name();
+
+ my ($action) = $curproc->safe_cgi_action_name() || '';
+ unless ($action) {
+ $curproc->logdebug("no action name");
+ }
+ return $action;
}
@@ -215,9 +219,15 @@ sub cgi_var_navigator_title
if ($mode eq 'admin') {
return "<B>$fml_url admin menu</B>\n<BR>";
}
- else {
+ elsif ($mode eq 'ml-admin') {
return "<B>$fml_url ml-admin menu</B>\n<BR>";
}
+ elsif ($mode eq 'anonymous') {
+ return "<B>$fml_url anonymous menu</B>\n<BR>";
+ }
+ else {
+ return "<B>$fml_url menu</B>\n<BR>";
+ }
}
@@ -297,7 +307,7 @@ Ken'ichi Fukamachi
=head1 COPYRIGHT
-Copyright (C) 2003,2004,2005 Ken'ichi Fukamachi
+Copyright (C) 2003,2004,2005,2008 Ken'ichi Fukamachi
All rights reserved. This program is free software; you can
redistribute it and/or modify it under the same terms as Perl itself.