[Erp5-report] r26057 - in /erp5/trunk/bt5/erp5_deferred_style: SkinTemplateItem/portal_skin...

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Mar 16 18:04:36 CET 2009


Author: jerome
Date: Mon Mar 16 18:04:32 2009
New Revision: 26057

URL: http://svn.erp5.org?rev=26057&view=rev
Log:
- filter out request keys starting by field__proxyfield, like the one used for proxyfields cache, because they are not pickleable. It would be nice to simply remove what's not picklable, but how to do this from restricted code?
- portal.ERP5Site_getAuthenticatedMemberPersonValue() just returns None if no person is found
- translate report title

Modified:
    erp5/trunk/bt5/erp5_deferred_style/SkinTemplateItem/portal_skins/erp5_deferred_style_core/Base_activateReport.xml
    erp5/trunk/bt5/erp5_deferred_style/bt/revision

Modified: erp5/trunk/bt5/erp5_deferred_style/SkinTemplateItem/portal_skins/erp5_deferred_style_core/Base_activateReport.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_deferred_style/SkinTemplateItem/portal_skins/erp5_deferred_style_core/Base_activateReport.xml?rev=26057&r1=26056&r2=26057&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_deferred_style/SkinTemplateItem/portal_skins/erp5_deferred_style_core/Base_activateReport.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_deferred_style/SkinTemplateItem/portal_skins/erp5_deferred_style_core/Base_activateReport.xml [utf8] Mon Mar 16 18:04:32 2009
@@ -62,17 +62,16 @@
 portal = context.getPortalObject()\n
 N_ = portal.Base_translateString\n
 \n
-try:\n
-  person_value = portal.ERP5Site_getAuthenticatedMemberPersonValue()\n
-except ValueError:\n
+person_value = portal.ERP5Site_getAuthenticatedMemberPersonValue()\n
+if person_value is None:\n
   portal.changeSkin(None)\n
   return context.Base_redirect(\'view\', keep_items=dict(\n
-              portal_status_message=N_("You didn\'t defined your email address")))\n
+              portal_status_message=N_("No person found for your user")))\n
 \n
 if person_value.getDefaultEmailText(\'\') == \'\':\n
   portal.changeSkin(None)\n
   return context.Base_redirect(\'view\', keep_items=dict(\n
-              portal_status_message=N_("You didn\'t defined your email address")))\n
+              portal_status_message=N_("You haven\'t defined your email address")))\n
   \n
 active_process = portal.portal_activities.newActiveProcess()\n
 user_name = context.portal_membership.getAuthenticatedMember().getUserName()\n
@@ -91,6 +90,9 @@
       \'SERVER_URL\', \'AUTHENTICATION_PATH\', \'USER_PREF_LANGUAGES\', \'PARENTS\',\n
       \'PUBLISHED\', \'AcceptLanguage\', \'AcceptCharset\', \'RESPONSE\',\n
       \'ACTUAL_URL\'):\n
+    # XXX proxy fields stores a cache in request.other that cannot be pickled\n
+    if k.startswith(\'field__proxyfield\'):\n
+      continue\n
     request_other[k] = v\n
 \n
 localizer_language = portal.Localizer.get_selected_language()\n
@@ -114,7 +116,7 @@
            active_process_url=active_process.getRelativeUrl(),\n
            skin_name=skin_name,\n
            localizer_language=localizer_language,\n
-           title=form.getProperty(\'title\'),\n
+           title=N_(form.getProperty(\'title\')),\n
            request_other=request_other,\n
            form_path=form.getPhysicalPath(),\n
            user_name=user_name,\n
@@ -183,7 +185,6 @@
                             <string>portal</string>
                             <string>N_</string>
                             <string>person_value</string>
-                            <string>ValueError</string>
                             <string>None</string>
                             <string>dict</string>
                             <string>active_process</string>

Modified: erp5/trunk/bt5/erp5_deferred_style/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_deferred_style/bt/revision?rev=26057&r1=26056&r2=26057&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_deferred_style/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_deferred_style/bt/revision [utf8] Mon Mar 16 18:04:32 2009
@@ -1,1 +1,1 @@
-48
+49




More information about the Erp5-report mailing list