summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2014-05-30 18:11:37 +0000
committerTed Trask <ttrask01@yahoo.com>2014-05-30 18:19:36 +0000
commit6ffee650d3b8007283a55027227de12c72cc9b20 (patch)
tree04e8838cf3d825532d693065b4046b0c47b125e7
parent33467edb879cfdd77d3f62edf1ad582b8e557ac4 (diff)
downloadacf-core-6ffee650d3b8007283a55027227de12c72cc9b20.tar.bz2
acf-core-6ffee650d3b8007283a55027227de12c72cc9b20.tar.xz
Fixed bug in www controller redirect_to_referrer if the referrer is missing
(cherry picked from commit 808a14774ed9ef0040f3e30ffc8af5dd3d786272)
-rw-r--r--app/acf_www-controller.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/acf_www-controller.lua b/app/acf_www-controller.lua
index bc0c139..2f19d68 100644
--- a/app/acf_www-controller.lua
+++ b/app/acf_www-controller.lua
@@ -382,6 +382,7 @@ mymodule.dispatch = function (self, userprefix, userctlr, useraction)
self.conf.controller = userctlr or ""
self.conf.action = useraction or ""
end
+ --self.logevent("WWW.dispatch "..self.conf.prefix..self.conf.controller.."/"..self.conf.action)
-- This is for get / post data saved for after logon
if self.sessiondata.logonredirect and self.conf.prefix == self.sessiondata.logonredirect.prefix
@@ -534,7 +535,7 @@ mymodule.redirect_to_referrer = function(self, result)
-- If we have a result, then we did something, so we might have to redirect
if not ENV.HTTP_REFERER then
-- If no referrer, we have a potential problem.
- if not find_view(self.conf.appdir, self.conf.prefix, self.conf.controller, self.conf.action, self.conf.viewtype or "html") then
+ if not self.find_view(self.conf.appdir, self.conf.prefix, self.conf.controller, self.conf.action, self.conf.viewtype or "html") then
-- Action does not have view, so redirect to default action for this controller.
self:redirect()
end