diff options
author | Ted Trask <ttrask01@yahoo.com> | 2008-07-02 19:37:37 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2008-07-02 19:37:37 +0000 |
commit | bc8c34d81a8e90a9d9de22cb313a8738c86bb15c (patch) | |
tree | 5dfc604f959bfcf65936899a7ac8b148f747cca6 /lib/controllerfunctions.lua | |
parent | 997b4dcd33463841aa8f1ca6d59dea7bc9d38ae9 (diff) | |
download | acf-core-bc8c34d81a8e90a9d9de22cb313a8738c86bb15c.tar.bz2 acf-core-bc8c34d81a8e90a9d9de22cb313a8738c86bb15c.tar.xz |
Changed interfaces to use controllerfunctions.
git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@1268 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'lib/controllerfunctions.lua')
-rw-r--r-- | lib/controllerfunctions.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/controllerfunctions.lua b/lib/controllerfunctions.lua index 23e57d4..53ef927 100644 --- a/lib/controllerfunctions.lua +++ b/lib/controllerfunctions.lua @@ -1,6 +1,6 @@ module(..., package.seeall) -function handle_form(self, getFunction, setFunction, clientdata, option, label, descr) +function handle_form(self, getFunction, setFunction, clientdata, option, label, descr, redirectOnSuccess) local form = getFunction() if clientdata[option] then @@ -25,6 +25,9 @@ function handle_form(self, getFunction, setFunction, clientdata, option, label, form.descr = descr end form = self:redirect_to_referrer(form) + if redirectOnSuccess and not form.errtxt then + self:redirect(redirectOnSuccess) + end else form = self:redirect_to_referrer() or form end |