diff options
author | ttrask <ttrask@ab2d0c66-481e-0410-8bed-d214d4d58bed> | 2009-03-17 20:39:56 +0000 |
---|---|---|
committer | ttrask <ttrask@ab2d0c66-481e-0410-8bed-d214d4d58bed> | 2009-03-17 20:39:56 +0000 |
commit | c700c97cb992cdc3eb62d93a52e1bf56ed5ea585 (patch) | |
tree | fb6446b8fbe31833808ab1319d845b0614047fee /lib/controllerfunctions.lua | |
parent | 5dc15abba740eae84b4202a6a7319cad163fe87c (diff) | |
download | acf-core-c700c97cb992cdc3eb62d93a52e1bf56ed5ea585.tar.bz2 acf-core-c700c97cb992cdc3eb62d93a52e1bf56ed5ea585.tar.xz |
Changed the way startstop works in core to add a list of allowed actions. Modified all ACFs that don't use the standard functions to work with new library method.
git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@1730 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'lib/controllerfunctions.lua')
-rw-r--r-- | lib/controllerfunctions.lua | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/controllerfunctions.lua b/lib/controllerfunctions.lua index 90d31a4..dbdfd19 100644 --- a/lib/controllerfunctions.lua +++ b/lib/controllerfunctions.lua @@ -78,15 +78,13 @@ function handle_form(self, getFunction, setFunction, clientdata, option, label, end function handle_startstop(self, startstopfunction, getstatusfunction, clientdata) - local result - if clientdata.action then - result = startstopfunction(clientdata.action) - end - result = self:redirect_to_referrer(result) + local result = startstopfunction(clientdata.action) + result.value.result = self:redirect_to_referrer(result.value.result) local status = getstatusfunction() if status.value.status then status = status.value.status end + result.value.status = status - return cfe({ type="group", value={status=status, result=result} }) + return result end |