summaryrefslogtreecommitdiffstats
path: root/tinydns-controller.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2008-04-24 20:31:58 +0000
committerTed Trask <ttrask01@yahoo.com>2008-04-24 20:31:58 +0000
commitbef973aa080f0b41c22f0819b66c573319c126e6 (patch)
treed169cdf52b61f992235f8785c2065253db22fb94 /tinydns-controller.lua
parentc156d77e4b96603e58afa2d4ea01aaa97b5a2147 (diff)
downloadacf-tinydns-bef973aa080f0b41c22f0819b66c573319c126e6.tar.bz2
acf-tinydns-bef973aa080f0b41c22f0819b66c573319c126e6.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/tinydns/trunk@1037 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'tinydns-controller.lua')
-rw-r--r--tinydns-controller.lua13
1 files changed, 1 insertions, 12 deletions
diff --git a/tinydns-controller.lua b/tinydns-controller.lua
index b8c2b6b..652f262 100644
--- a/tinydns-controller.lua
+++ b/tinydns-controller.lua
@@ -6,12 +6,6 @@ local newrecordtxt = "[New]"
-- ################################################################################
-- LOCAL FUNCTIONS
-local list_redir = function (self)
- self.conf.action = "status"
- self.conf.type = "redir"
- error (self.conf)
-end
-
local function getstatus(self)
local status = self.model.getstatus()
if (#status.status.value > 0) then
@@ -108,12 +102,7 @@ end
-- ################################################################################
-- PUBLIC FUNCTIONS
-mvc = {}
-mvc.on_load = function(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)
local config = {}