From dd872a1b92ecfe3f170e2698cebea47f547470aa Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Fri, 25 Apr 2008 19:24:36 +0000 Subject: Merged last two versions of file (previous check-in deleted some changes) git-svn-id: svn://svn.alpinelinux.org/acf/gnats/trunk@1046 ab2d0c66-481e-0410-8bed-d214d4d58bed --- gnats-controller.lua | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) (limited to 'gnats-controller.lua') diff --git a/gnats-controller.lua b/gnats-controller.lua index d5926ba..03df468 100644 --- a/gnats-controller.lua +++ b/gnats-controller.lua @@ -97,24 +97,10 @@ local descr = { } --- ################################################################################ --- LOCAL FUNCTIONS - -local function list_redir(self) - self.conf.action = "status" - self.conf.type = "redir" - error (self.conf) -end - - -- ################################################################################ -- PUBLIC FUNCTIONS -mvc = {} -function mvc.on_load(self, parent) - if (self.worker[self.conf.action] == nil ) or ( self.conf.action == "init" ) then - self.worker[self.conf.action] = list_redir(self) - end -end + +default_action = "status" function status(self) return { status=self.model.getstatus() } @@ -265,7 +251,7 @@ function queryresult(self) if (tonumber(pr_id)) then query.header, query.sfields, query.mfields = self.model:read_pr(pr_id) else - list_redir(self) + redirect(self) end local myform = query.header -- cgit v1.2.3