From 02082d03de31af25beed17cf3d61ca513ea6f885 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Sat, 12 Jul 2008 15:57:36 +0000 Subject: Fixed redirect_to_referrer with GET data. Moved handling of multi select from acf_www-controller to controllerfunctions. Fixed form ids containing '.'. Added new handle_clientdata function to controllerfunctions. Modified password-controller to use handle_clientdata for multi select to work.k git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@1299 ab2d0c66-481e-0410-8bed-d214d4d58bed --- app/acf_www-controller.lua | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'app/acf_www-controller.lua') diff --git a/app/acf_www-controller.lua b/app/acf_www-controller.lua index ce58893..cd8a49f 100644 --- a/app/acf_www-controller.lua +++ b/app/acf_www-controller.lua @@ -221,20 +221,6 @@ mvc.on_load = function (self, parent) self.clientdata = FORM self.conf.clientip = ENV.REMOTE_ADDR - -- FIXME this is because multi selects don't work in haserl - for name,oldtable in pairs(self.clientdata) do - if type(oldtable) == "table" then - -- Assume it's a sparse array, and remove blanks - local newtable={} - for x=1,table.maxn(oldtable) do - if oldtable[x] then - newtable[#newtable + 1] = oldtable[x] - end - end - self.clientdata[name] = newtable - end - end - parent_exception_handler = parent.exception_handler -- this sets the package path for us and our children @@ -488,7 +474,7 @@ redirect_to_referrer = function(self, result) -- might not have view. So redirect to default action for this controller. self:redirect() else - local prefix, controller, action = self.parse_path_info(ENV.HTTP_REFERER) + local prefix, controller, action = self.parse_path_info(ENV.HTTP_REFERER:gsub("%?.*", "")) if controller ~= self.conf.controller or action ~= self.conf.action then self.sessiondata[self.conf.action.."result"] = result error({type="redir_to_referrer"}) -- cgit v1.2.3