Commit b4abf927 authored by Ted Trask's avatar Ted Trask
Browse files

Replaced all list_redir functions with redirect in mvc.lua, implemented a...

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/fetchmail/trunk@1037 ab2d0c66-481e-0410-8bed-d214d4d58bed
parent fbe7ad8b
......@@ -3,12 +3,6 @@ module(..., package.seeall)
-- ################################################################################
-- LOCAL FUNCTIONS
local function list_redir (self)
self.conf.action = "status"
self.conf.type = "redir"
error (self.conf)
end
local function displaycmdsave(self)
-- Add a cmd button to the view
local cmdsave = cfe({ name="cmdsave",
......@@ -58,12 +52,7 @@ 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(self) }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment