Commit dc284e58 authored by Sebastien Robin's avatar Sebastien Robin

It's not a good idea to put the content of the listbox inside the pickle on...

It's not a good idea to put the content of the listbox inside the pickle on dialogs. The content of listbox is too big in order to fit into pickle, and we exceed the url size limit. This should not break dialogs and fast inputs.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16015 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 337e5cfd
......@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
......@@ -216,7 +213,15 @@ if len(listbox_id_list):\n
kw[listbox_id] = request_form[listbox_id] = listbox_line_list\n
\n
if enable_pickle or (form.update_action != \'\'):\n
kw[\'pickle_string\'] = request_form[\'pickle_string\'] = context.portal_selections.getPickle(**kw)\n
# Do not put listbox in pickle, because this pickle becomes too big\n
# wich is not compatible with the url limit size\n
pickle_kw = {}\n
excluded_key_list = listbox_id_list\n
excluded_key_list.extend(["%s_uid" % x for x in listbox_id_list])\n
for key in kw.keys():\n
if key not in excluded_key_list:\n
pickle_kw[key] = kw[key]\n
kw[\'pickle_string\'] = request_form[\'pickle_string\'] = context.portal_selections.getPickle(**pickle_kw)\n
\n
# Check if the selection changed\n
if hasattr(kw, \'previous_md5_object_uid_list\'):\n
......@@ -370,6 +375,11 @@ return context.REQUEST.RESPONSE.redirect(redirect_url)\n
<string>key</string>
<string>listbox_line</string>
<string>tuple</string>
<string>pickle_kw</string>
<string>excluded_key_list</string>
<string>append</string>
<string>$append0</string>
<string>x</string>
<string>selection_list</string>
<string>map</string>
<string>object_uid_list</string>
......
424
\ No newline at end of file
425
\ No newline at end of file
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