summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Process/CGI/Kernel.pm
diff options
context:
space:
mode:
authorfukachan <fukachan>2003-11-02 05:12:37 +0000
committerfukachan <fukachan>2003-11-02 05:12:37 +0000
commit48cb17ea12fc45214e3ca3fc646d986da8535d3e (patch)
treebaf61dd38c0c0141a0c6c6129f29dc2b68906b40 /fml/lib/FML/Process/CGI/Kernel.pm
parent2cbe1714b1a0b161eddd9cb348022d180c6151be (diff)
downloadfml8-48cb17ea12fc45214e3ca3fc646d986da8535d3e.tar.gz
fml8-48cb17ea12fc45214e3ca3fc646d986da8535d3e.tar.bz2
fml8-48cb17ea12fc45214e3ca3fc646d986da8535d3e.zip
move safe_cgi_action_name from FML::Process::Utils to
FML::Process::CGI::Utils.
Diffstat (limited to 'fml/lib/FML/Process/CGI/Kernel.pm')
-rw-r--r--fml/lib/FML/Process/CGI/Kernel.pm28
1 files changed, 27 insertions, 1 deletions
diff --git a/fml/lib/FML/Process/CGI/Kernel.pm b/fml/lib/FML/Process/CGI/Kernel.pm
index cbbf4f81..a8c5bb3f 100644
--- a/fml/lib/FML/Process/CGI/Kernel.pm
+++ b/fml/lib/FML/Process/CGI/Kernel.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: Kernel.pm,v 1.64 2003/10/16 15:06:57 fukachan Exp $
+# $FML: Kernel.pm,v 1.65 2003/10/18 04:43:51 fukachan Exp $
#
package FML::Process::CGI::Kernel;
@@ -872,6 +872,32 @@ sub cgi_try_get_ml_name
}
+=head2 safe_cgi_action_name
+
+return the current action name,
+
+=cut
+
+
+# Descriptions: return the current action name,
+# which syntax is checked by regexp.
+# Arguments: OBJ($curproc)
+# Side Effects: none
+# Return Value: STR
+sub safe_cgi_action_name
+{
+ my ($curproc) = @_;
+ my $name = $curproc->myname();
+
+ if ($curproc->is_safe_syntax('action', $name)) {
+ return $name;
+ }
+ else {
+ return undef;
+ }
+}
+
+
=head2 safe_param_xxx()
get and filter param('xxx') via AUTOLOAD().