diff options
| author | fukachan <fukachan> | 2003-11-02 05:12:37 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2003-11-02 05:12:37 +0000 |
| commit | 48cb17ea12fc45214e3ca3fc646d986da8535d3e (patch) | |
| tree | baf61dd38c0c0141a0c6c6129f29dc2b68906b40 /fml/lib | |
| parent | 2cbe1714b1a0b161eddd9cb348022d180c6151be (diff) | |
| download | fml8-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')
| -rw-r--r-- | fml/lib/FML/Process/CGI/Kernel.pm | 28 | ||||
| -rw-r--r-- | fml/lib/FML/Process/Utils.pm | 21 |
2 files changed, 28 insertions, 21 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(). diff --git a/fml/lib/FML/Process/Utils.pm b/fml/lib/FML/Process/Utils.pm index 54af9117..b18634e0 100644 --- a/fml/lib/FML/Process/Utils.pm +++ b/fml/lib/FML/Process/Utils.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: Utils.pm,v 1.89 2003/10/16 14:05:26 fukachan Exp $ +# $FML: Utils.pm,v 1.90 2003/10/18 07:32:08 fukachan Exp $ # package FML::Process::Utils; @@ -633,25 +633,6 @@ sub myname } -# 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; - } -} - - # Descriptions: check $str with $class regexp defined in FML::Restriction. # Arguments: OBJ($curproc) STR($class) STR($str) # Side Effects: none |
