From 32d91ea7a92c5edee22900e8da1cafda058ca400 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Thu, 3 Jul 2008 13:43:20 +0000 Subject: Modified skins to use viewfunctions and controllerfunctions. git-svn-id: svn://svn.alpinelinux.org/acf/alpine-baselayout/trunk@1272 ab2d0c66-481e-0410-8bed-d214d4d58bed --- skins-controller.lua | 4 +--- skins-model.lua | 1 + 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 @@ - - - + + + + +

Available skins

@@ -13,6 +15,3 @@
- - - -- cgit v1.2.3