Commit d7ad92b8 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

remove ignore_layout parameter from cancel_url otherwise we will have two...

remove ignore_layout parameter from cancel_url otherwise we will have two ignore_layout parameters after clicking cancel button (r.26607 is not enough, i.e. that does not work in the case where ignore_layout parameter is the first parameter).


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26950 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 72bf6a4a
...@@ -41,6 +41,7 @@ from Selection import Selection, DomainSelection ...@@ -41,6 +41,7 @@ from Selection import Selection, DomainSelection
from ZPublisher.HTTPRequest import FileUpload from ZPublisher.HTTPRequest import FileUpload
import md5 import md5
import string, re import string, re
from urlparse import urlsplit, urlunsplit
from zLOG import LOG, INFO from zLOG import LOG, INFO
from Acquisition import aq_base from Acquisition import aq_base
from Products.ERP5Type.Message import translateString from Products.ERP5Type.Message import translateString
...@@ -1172,9 +1173,11 @@ class SelectionTool( BaseTool, UniqueObject, SimpleItem ): ...@@ -1172,9 +1173,11 @@ class SelectionTool( BaseTool, UniqueObject, SimpleItem ):
# remove ignore_layout parameter from cancel_url otherwise we # remove ignore_layout parameter from cancel_url otherwise we
# will have two ignore_layout parameters after clicking cancel # will have two ignore_layout parameters after clicking cancel
# button. # button.
kw['cancel_url'] = '&'.join([x for x in \ split_referer = list(urlsplit(REQUEST.get('HTTP_REFERER')))
REQUEST.get('HTTP_REFERER').split('&') \ split_referer[3] = '&'.join([x for x in \
split_referer[3].split('&') \
if not re.match('^ignore_layout[:=]', x)]) if not re.match('^ignore_layout[:=]', x)])
kw['cancel_url'] = urlunsplit(split_referer)
proxy_listbox_ids = field.get_value('proxy_listbox_ids') proxy_listbox_ids = field.get_value('proxy_listbox_ids')
REQUEST.set('proxy_listbox_ids', proxy_listbox_ids) REQUEST.set('proxy_listbox_ids', proxy_listbox_ids)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment