diff options
author | Nathan Angelacos <nangel@tetrasec.net> | 2007-10-24 19:22:53 +0000 |
---|---|---|
committer | Nathan Angelacos <nangel@tetrasec.net> | 2007-10-24 19:22:53 +0000 |
commit | db52de1ab026675b4bcedcb55e7187160da99423 (patch) | |
tree | 6c16837518459d980efb2e755fd403fcefac8b12 /www | |
parent | b51c6acc4ad5820a974e78935f7e8f50339df6e7 (diff) | |
download | acf-core-db52de1ab026675b4bcedcb55e7187160da99423.tar.bz2 acf-core-db52de1ab026675b4bcedcb55e7187160da99423.tar.xz |
mvc.lua - parse_path_info can't use string as a parameter.
git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@225 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'www')
-rwxr-xr-x | www/cgi-bin/mvc.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/www/cgi-bin/mvc.lua b/www/cgi-bin/mvc.lua index 048d7ba..9463ae7 100755 --- a/www/cgi-bin/mvc.lua +++ b/www/cgi-bin/mvc.lua @@ -228,15 +228,15 @@ end -- parse a "URI" like string into a prefix, controller and action -- return them (or blank strings) -parse_path_info = function( string ) - string = string or "" +parse_path_info = function( str ) + str = str or "" -- If it ends in a /, then add another to force -- a blank action (the user gave a controller without action) - if string.match (string, "[^/]/$" ) then - string = string .. "/" + if string.match (str, "[^/]/$" ) then + str = str .. "/" end - local action = basename(string) - local temp = dirname(string) + local action = basename(str) + local temp = dirname(str) local controller = basename(temp) local prefix = dirname(temp) .. "/" return prefix, controller, action |