diff options
author | Mika Havela <mika.havela@gmail.com> | 2008-04-08 12:35:04 +0000 |
---|---|---|
committer | Mika Havela <mika.havela@gmail.com> | 2008-04-08 12:35:04 +0000 |
commit | 63e8c6b82c980876ddc522174970e5b1b9014b06 (patch) | |
tree | 73b04306be53adcf115d4de3cec64fe69815ea3a /tinydns-controller.lua | |
parent | ea416afe39d2b4d796ccbfe0a7819968ef2d6f63 (diff) | |
download | acf-tinydns-63e8c6b82c980876ddc522174970e5b1b9014b06.tar.bz2 acf-tinydns-63e8c6b82c980876ddc522174970e5b1b9014b06.tar.xz |
Cleaning up the code.v0.1.1
git-svn-id: svn://svn.alpinelinux.org/acf/tinydns/trunk@954 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'tinydns-controller.lua')
-rw-r--r-- | tinydns-controller.lua | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/tinydns-controller.lua b/tinydns-controller.lua index 502af03..47bb8d7 100644 --- a/tinydns-controller.lua +++ b/tinydns-controller.lua @@ -1,20 +1,17 @@ module(..., package.seeall) +-- Set variables local newrecordtxt = "[New]" +-- ################################################################################ +-- LOCAL FUNCTIONS + local list_redir = function (self) self.conf.action = "status" self.conf.type = "redir" error (self.conf) end -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 - local function getstatus(self) local status = self.model.getstatus() if (#status.status.value > 0) then @@ -76,6 +73,13 @@ 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 + function status(self) local config = {} config.settings = {} |