Commit 31303667 authored by Ted Trask's avatar Ted Trask

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/dnscache/trunk@1037 ab2d0c66-481e-0410-8bed-d214d4d58bed
parent 36e00328
......@@ -9,12 +9,6 @@ local newrecordtxt = "[New]"
-- ################################################################################
-- LOCAL FUNCTIONS
local function list_redir(self)
self.conf.action = "status"
self.conf.type = "redir"
error (self.conf)
end
local function displaycmdmanagement(pidofstatus)
-- Add a management buttons
local management = {}
......@@ -53,12 +47,8 @@ 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() }
......
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