summaryrefslogtreecommitdiffstats
path: root/www
diff options
context:
space:
mode:
authorNathan Angelacos <nangel@tetrasec.net>2007-10-25 20:54:20 +0000
committerNathan Angelacos <nangel@tetrasec.net>2007-10-25 20:54:20 +0000
commit2ec5ea76a03509585a553e275fc38dd9fc89b235 (patch)
treef646088c613caa01e263672f0cac87f9552376ff /www
parenta6d5945c9f02fef31bd1eb77011d3a850cad0c28 (diff)
downloadacf-core-2ec5ea76a03509585a553e275fc38dd9fc89b235.tar.bz2
acf-core-2ec5ea76a03509585a553e275fc38dd9fc89b235.tar.xz
mvc.lua - last commit broke inheritance
git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@233 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'www')
-rwxr-xr-xwww/cgi-bin/mvc.lua9
1 files changed, 5 insertions, 4 deletions
diff --git a/www/cgi-bin/mvc.lua b/www/cgi-bin/mvc.lua
index bb4f9dd..23a71c7 100755
--- a/www/cgi-bin/mvc.lua
+++ b/www/cgi-bin/mvc.lua
@@ -85,7 +85,8 @@ new = function (self, modname)
end
-- This is a sample front controller/dispatch.
-dispatch = function (self, prefix, controller, action)
+dispatch = function (self, prefix, userctlr, action)
+ local controller
local success, err = xpcall ( function ()
if prefix == nil then
@@ -93,10 +94,10 @@ dispatch = function (self, prefix, controller, action)
parse_path_info(ENV["PATH_INFO"])
else
self.conf.prefix = prefix
- self.conf.controller = controller or ""
+ self.conf.controller = userctlr or ""
self.conf.action = action or ""
end
-
+
-- If they didn't provide a controller, and a default was specified
-- use it
if self.conf.controller == "" and self.conf.default_controller then
@@ -133,7 +134,7 @@ dispatch = function (self, prefix, controller, action)
end
- local viewfunc = controller:view_resolver(viewtable)
+ local viewfunc = controller.worker:view_resolver(viewtable)
viewfunc (viewtable)
end,