From 2ec5ea76a03509585a553e275fc38dd9fc89b235 Mon Sep 17 00:00:00 2001 From: Nathan Angelacos Date: Thu, 25 Oct 2007 20:54:20 +0000 Subject: mvc.lua - last commit broke inheritance git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@233 ab2d0c66-481e-0410-8bed-d214d4d58bed --- www/cgi-bin/mvc.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'www/cgi-bin/mvc.lua') 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, -- cgit v1.2.3