diff options
| author | Ted Trask <ttrask01@yahoo.com> | 2009-12-28 10:32:40 +0000 | 
|---|---|---|
| committer | Ted Trask <ttrask01@yahoo.com> | 2009-12-28 10:32:40 +0000 | 
| commit | 2678d43e1f155b2b692c729bb0470967072a8d58 (patch) | |
| tree | 3eb10f930770897e028bac3079d7eb46e5a481c8 /lib/menubuilder.lua | |
| parent | bd7a0266eb07cb8859fa7518f0000ef0240923d6 (diff) | |
| download | acf-core-2678d43e1f155b2b692c729bb0470967072a8d58.tar.bz2 acf-core-2678d43e1f155b2b692c729bb0470967072a8d58.tar.xz | |
Removed redundant/buggy basename and dirname functions. Added parse_redir_string to www controller.
Removed basename and dirname from mvc and fs, use posix functions instead.
parse_path_info was buggy and used 2 ways, rewrote and created parse_redir_string for backwards parsing.
Diffstat (limited to 'lib/menubuilder.lua')
| -rw-r--r-- | lib/menubuilder.lua | 5 | 
1 files changed, 3 insertions, 2 deletions
| diff --git a/lib/menubuilder.lua b/lib/menubuilder.lua index 8c93795..51ed76d 100644 --- a/lib/menubuilder.lua +++ b/lib/menubuilder.lua @@ -5,6 +5,7 @@    ]]--  module(..., package.seeall) +require("posix")  require("format")  -- returns a table of the "*.menu" tables  @@ -63,8 +64,8 @@ get_menuitems = function (startdir)  	local reversecats = {}  	startdir = (string.gsub(startdir, "/$", ""))	--remove trailing /  	for k,filename in pairs(get_candidates(startdir)) do -		local controller = mvc.basename(filename, ".menu") -		local prefix = (string.gsub(mvc.dirname(filename), startdir, "")).."/" +		local controller = string.gsub(posix.basename(filename), ".menu$", "") +		local prefix = (string.gsub(posix.dirname(filename), startdir, "")).."/"  		-- open the menu file, and parse the contents  		local handle = io.open(filename) | 
