[Erp5-report] r23984 - /erp5/trunk/products/ERP5Wizard/Tool/WizardTool.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Oct 2 17:34:33 CEST 2008
Author: yusei
Date: Thu Oct 2 17:34:26 2008
New Revision: 23984
URL: http://svn.erp5.org?rev=23984&view=rev
Log:
First page after login will be displayed without cookie so that tool must find language setting from REQUEST itself.
Modified:
erp5/trunk/products/ERP5Wizard/Tool/WizardTool.py
Modified: erp5/trunk/products/ERP5Wizard/Tool/WizardTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Wizard/Tool/WizardTool.py?rev=23984&r1=23983&r2=23984&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Wizard/Tool/WizardTool.py (original)
+++ erp5/trunk/products/ERP5Wizard/Tool/WizardTool.py Thu Oct 2 17:34:26 2008
@@ -425,11 +425,12 @@
parameter_dict['erp5_url'] = self.getPortalObject().absolute_url()
# add user preffered language
REQUEST = getattr(self, 'REQUEST', None)
- if REQUEST is None:
- parameter_dict['user_preferred_language'] = 'en'
- else:
- parameter_dict['user_preferred_language'] = REQUEST.cookies.get('configurator_user_preferred_language', 'en')
-
+ configurator_user_preferred_language = 'en'
+ if REQUEST is not None:
+ # language value will be in cookie or REQUEST itself.
+ configurator_user_preferred_language = REQUEST.get('configurator_user_preferred_language', configurator_user_preferred_language)
+ parameter_dict['user_preferred_language'] = configurator_user_preferred_language
+
def _updateParameterDictWithFileUpload(self, parameter_dict):
"""Updates parameter_dict to replace file upload with their file content,
encoded as XML-RPC Binary
More information about the Erp5-report
mailing list