diff options
| author | Ted Trask <ttrask01@yahoo.com> | 2012-04-18 01:16:30 +0000 | 
|---|---|---|
| committer | Ted Trask <ttrask01@yahoo.com> | 2012-04-18 01:16:30 +0000 | 
| commit | 80f25c722a6ad2a9fe3932a6a7a1aa63169ddf33 (patch) | |
| tree | e9442fc512bf85c3929319b8262c9eef574f4deb | |
| parent | b040b787847d89b4e0acbfac7791163c68429b6c (diff) | |
| download | acf-fetchmail-80f25c722a6ad2a9fe3932a6a7a1aa63169ddf33.tar.bz2 acf-fetchmail-80f25c722a6ad2a9fe3932a6a7a1aa63169ddf33.tar.xz  | |
Started work on updating for acf-core-0.15
Removed controllerfunctions library (still needs more work and corresponding work in model)
Updated for viewfunctions to htmlviewfunctions and modified require statements for acf libraries
| -rw-r--r-- | fetchmail-config-html.lsp | 4 | ||||
| -rw-r--r-- | fetchmail-controller.lua | 12 | ||||
| -rw-r--r-- | fetchmail-editentry-html.lsp | 4 | ||||
| -rw-r--r-- | fetchmail-listentries-html.lsp | 4 | ||||
| -rw-r--r-- | fetchmail-model.lua | 6 | 
5 files changed, 14 insertions, 16 deletions
diff --git a/fetchmail-config-html.lsp b/fetchmail-config-html.lsp index 9be8300..8aa6299 100644 --- a/fetchmail-config-html.lsp +++ b/fetchmail-config-html.lsp @@ -1,7 +1,7 @@  <% local view, viewlibrary, page_info, session = ... %> -<% require("viewfunctions") %> +<% require("htmlviewfunctions") %> -<% displaycommandresults({"editconfig", "editentry", "deleteentry", "createentry"}, session) %> +<% htmlviewfunctions.displaycommandresults({"editconfig", "editentry", "deleteentry", "createentry"}, session) %>  <% if viewlibrary and viewlibrary.dispatch_component then  	viewlibrary.dispatch_component("status") diff --git a/fetchmail-controller.lua b/fetchmail-controller.lua index 404c05b..c2168f7 100644 --- a/fetchmail-controller.lua +++ b/fetchmail-controller.lua @@ -1,7 +1,5 @@  module(..., package.seeall) -require("controllerfunctions") -  default_action = "status"  function status(self) @@ -9,15 +7,15 @@ function status(self)  end  function startstop(self) -	return controllerfunctions.handle_startstop(self, self.model.startstop_service, self.clientdata) +	return self.handle_form(self, self.model.get_startstop, self.model.startstop_service, self.clientdata)  end  function editconfig(self) -	return controllerfunctions.handle_form(self, self.model.getconfig, self.model.updateconfig, self.clientdata, "Save", "Edit Config", "Configuration Set") +	return self.handle_form(self, self.model.getconfig, self.model.updateconfig, self.clientdata, "Save", "Edit Config", "Configuration Set")  end  function expert(self) -	return controllerfunctions.handle_form(self, self.model.get_filedetails, self.model.update_filecontent, self.clientdata, "Save", "Edit Config", "Configuration Set") +	return self.handle_form(self, self.model.get_filedetails, self.model.update_filecontent, self.clientdata, "Save", "Edit Config", "Configuration Set")  end  function listentries(self) @@ -25,11 +23,11 @@ function listentries(self)  end  function editentry(self) -	return controllerfunctions.handle_form(self, function() return self.model.readentry(self.clientdata.entry, self.clientdata.method, self.clientdata.remotemailbox, self.clientdata.localdomain) end, self.model.updateentry, self.clientdata, "Save", "Edit Entry", "Entry Saved") +	return self.handle_form(self, function() return self.model.readentry(self.clientdata.entry, self.clientdata.method, self.clientdata.remotemailbox, self.clientdata.localdomain) end, self.model.updateentry, self.clientdata, "Save", "Edit Entry", "Entry Saved")  end  function createentry(self) -	return controllerfunctions.handle_form(self, self.model.readentry, self.model.createentry, self.clientdata, "Create", "Create Entry", "Entry Created") +	return self.handle_form(self, self.model.readentry, self.model.createentry, self.clientdata, "Create", "Create Entry", "Entry Created")  end  function deleteentry(self) diff --git a/fetchmail-editentry-html.lsp b/fetchmail-editentry-html.lsp index 31066fb..ffdca6c 100644 --- a/fetchmail-editentry-html.lsp +++ b/fetchmail-editentry-html.lsp @@ -1,5 +1,5 @@  <% local form, viewlibrary, page_info = ...  -require("viewfunctions") +require("htmlviewfunctions")  %>  <H1><%= html.html_escape(form.label) %></H1> @@ -13,5 +13,5 @@ require("viewfunctions")  		form.value.localdomain.readonly = true  	end  	local order = { "remotehost", "enabled", "method", "remotemailbox", "remotepassword", "ssl", "localhost", "localmailbox", "localdomain", "envelope" } -	displayform(form, order) +	htmlviewfunctions.displayform(form, order)  %> diff --git a/fetchmail-listentries-html.lsp b/fetchmail-listentries-html.lsp index 2176bee..0a4c6fe 100644 --- a/fetchmail-listentries-html.lsp +++ b/fetchmail-listentries-html.lsp @@ -1,8 +1,8 @@  <% local data, viewlibrary, page_info, session = ...  -require("viewfunctions") +require("htmlviewfunctions")  %> -<% displaycommandresults({"editentry", "deleteentry", "createentry"}, session) %> +<% htmlviewfunctions.displaycommandresults({"editentry", "deleteentry", "createentry"}, session) %>  <h1>Edit/View Fetchmail Entries</h1>  <DL> diff --git a/fetchmail-model.lua b/fetchmail-model.lua index 0a6cc68..fbd63ad 100644 --- a/fetchmail-model.lua +++ b/fetchmail-model.lua @@ -3,9 +3,9 @@ module(..., package.seeall)  -- Load libraries  require("modelfunctions")  require("posix") -require("fs") -require("format") -require("validator") +fs = require("acf.fs") +format = require("acf.format") +validator = require("acf.validator")  -- Set variables  local packagename = "fetchmail"  | 
