module (..., package.seeall) -- ################################################################################ -- LOCAL FUNCTIONS local function list_redir (self) self.conf.action = "read" self.conf.type = "redir" error (self.conf) 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 function read (self ) return ({projects = self.model:get(), url = ENV["SCRIPT_NAME"] .. self.conf.prefix .. self.conf.controller} ) end function update (self ) return ({projects = self.model:get(), updates = self.model:update(), url = ENV["SCRIPT_NAME"] .. self.conf.prefix .. self.conf.controller} ) end function diff (self ) return ({projects = self.model:get(), updates = self.model:diffs(), url = ENV["SCRIPT_NAME"] .. self.conf.prefix .. self.conf.controller} ) end function status (self ) return ({projects = self.model:get(), updates = self.model:status(), url = ENV["SCRIPT_NAME"] .. self.conf.prefix .. self.conf.controller} ) end function log (self ) return ({projects = self.model:get(), updates = self.model:log(), url = ENV["SCRIPT_NAME"] .. self.conf.prefix .. self.conf.controller} ) end