diff options
author | Ted Trask <ttrask01@yahoo.com> | 2008-04-24 20:31:58 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2008-04-24 20:31:58 +0000 |
commit | c8c6d7d30c0a2b6d0ea1cb85f59ac77fe56fc0b4 (patch) | |
tree | 7824a1db4156549dbdf771544254e2bdd23a42ce | |
parent | 01cdce9069722b8b463f85455f6dc0c880bb20c3 (diff) | |
download | acf-squid-c8c6d7d30c0a2b6d0ea1cb85f59ac77fe56fc0b4.tar.bz2 acf-squid-c8c6d7d30c0a2b6d0ea1cb85f59ac77fe56fc0b4.tar.xz |
Replaced all list_redir functions with redirect in mvc.lua, implemented a default_action string in each controller, removing the on_load functions
git-svn-id: svn://svn.alpinelinux.org/acf/squid/trunk@1037 ab2d0c66-481e-0410-8bed-d214d4d58bed
-rw-r--r-- | squid-controller.lua | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/squid-controller.lua b/squid-controller.lua index 554289c..6f69caa 100644 --- a/squid-controller.lua +++ b/squid-controller.lua @@ -2,32 +2,7 @@ module (..., package.seeall) --- Cause an http redirect to our "read" action --- We use the self.conf table because it already has prefix,controller,etc --- The redir code is defined in the application error handler (acf-controller) -local list_redir = function (self) - self.conf.action = "basic" - self.conf.type = "redir" - error (self.conf) -end - -local pvt = {} -mvc= {} -mvc.on_load = function( self, parent ) - -- If they try to run a bogus action, send them to read - if ( rawget(self.worker, self.conf.action) == nil ) then - list_redir(self) - end - pvt.parent_on_exec = parent.worker.mvc.post_exec -end - -mvc.pre_exec = function( self ) - -- pvt.parent_on_exec () -end - -mvc.post_exec = function( self ) - return pvt.parent_on_exec() -end +default_action = "basic" dep = function( self ) |