From 63e8c6b82c980876ddc522174970e5b1b9014b06 Mon Sep 17 00:00:00 2001 From: Mika Havela Date: Tue, 8 Apr 2008 12:35:04 +0000 Subject: Cleaning up the code. git-svn-id: svn://svn.alpinelinux.org/acf/tinydns/trunk@954 ab2d0c66-481e-0410-8bed-d214d4d58bed --- tinydns-controller.lua | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'tinydns-controller.lua') 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 = {} -- cgit v1.2.3