diff options
author | Ted Trask <ttrask01@yahoo.com> | 2008-07-03 13:43:20 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2008-07-03 13:43:20 +0000 |
commit | 32d91ea7a92c5edee22900e8da1cafda058ca400 (patch) | |
tree | 13445d8e00e7ee3356f19a0973225967125ee3ff | |
parent | 7947f17ad4ba8e0b3c41a9ace736e005c66017c2 (diff) | |
download | acf-alpine-baselayout-32d91ea7a92c5edee22900e8da1cafda058ca400.tar.bz2 acf-alpine-baselayout-32d91ea7a92c5edee22900e8da1cafda058ca400.tar.xz |
Modified skins to use viewfunctions and controllerfunctions.
git-svn-id: svn://svn.alpinelinux.org/acf/alpine-baselayout/trunk@1272 ab2d0c66-481e-0410-8bed-d214d4d58bed
-rw-r--r-- | skins-controller.lua | 4 | ||||
-rw-r--r-- | skins-model.lua | 1 | ||||
-rw-r--r-- | skins-read-html.lsp | 11 |
3 files changed, 7 insertions, 9 deletions
diff --git a/skins-controller.lua b/skins-controller.lua index ee4ff9c..e344524 100644 --- a/skins-controller.lua +++ b/skins-controller.lua @@ -9,8 +9,6 @@ read = function (self ) end update = function (self ) - local newskin = self.clientdata.skin or "" - local updated = self.model.update(newskin) - redirect(self) + return self:redirect_to_referrer(self.model.update(self.clientdata.skin or "")) end diff --git a/skins-model.lua b/skins-model.lua index f4b4de6..441298e 100644 --- a/skins-model.lua +++ b/skins-model.lua @@ -5,6 +5,7 @@ local function set_skins(skin) local cmd = "/bin/sed -i 's/skin=.*/skin=" .. skin .. "/' /etc/acf/acf.conf" local f, errtxt = io.popen(cmd) local cmdoutput = f:read("*a") + if cmdoutput == "" then cmdoutput = "New skin selected" end f:close() return cmdoutput, errtxt end diff --git a/skins-read-html.lsp b/skins-read-html.lsp index 78f19d7..25ed300 100644 --- a/skins-read-html.lsp +++ b/skins-read-html.lsp @@ -1,6 +1,8 @@ -<? local view = ... ?> -<html> -<body> +<? local view, viewlibrary, page_info, session = ... ?> +<? require("viewfunctions") ?> + +<? displaycommandresults({"update"}, session) ?> + <h1>Available skins</h1> <DL> @@ -13,6 +15,3 @@ <? end ?> <? end ?> </DL> - -</body> -</html> |