Commit 6cc8134b authored by Tomáš Peterka's avatar Tomáš Peterka

[hal_json] Backward-compatibility - returning a global REQUEST in callDialogMethod

parent f4e93e19
...@@ -14,9 +14,10 @@ def isFieldType(field, type_name): ...@@ -14,9 +14,10 @@ def isFieldType(field, type_name):
from Products.Formulator.Errors import FormValidationError, ValidationError from Products.Formulator.Errors import FormValidationError, ValidationError
from ZTUtils import make_query from ZTUtils import make_query
request = REQUEST # Kato: I do not understand why we throw away REQUEST from parameters (hidden in **kw)
if REQUEST is None: # and use container.REQUEST just to introduce yet another global state
request = container.REQUEST # because REUQEST from arguments is a different instance than container.REQUEST!
request = container.REQUEST
# request.form holds POST data thus containing 'field_' + field.id items # request.form holds POST data thus containing 'field_' + field.id items
# such as 'field_your_some_field' # such as 'field_your_some_field'
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>dialog_method, dialog_id, dialog_category=\'\', update_method=None, REQUEST=None, silent_mode=0, **kw</string> </value> <value> <string>dialog_method, dialog_id, dialog_category=\'\', update_method=None, **kw</string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
......
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