[Erp5-report] r24847 - in /erp5/trunk/products/ERP5/bootstrap/erp5_core: SkinTemplateItem/p...

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Dec 9 13:14:56 CET 2008


Author: jerome
Date: Tue Dec  9 13:14:53 2008
New Revision: 24847

URL: http://svn.erp5.org?rev=24847&view=rev
Log:
- clear corresponding cache after changing password
- translate message when redirecting

Modified:
    erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/PreferenceTool_setNewPassword.xml
    erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/PreferenceTool_setNewPassword.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/PreferenceTool_setNewPassword.xml?rev=24847&r1=24846&r2=24847&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/PreferenceTool_setNewPassword.xml [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/PreferenceTool_setNewPassword.xml [utf8] Tue Dec  9 13:14:53 2008
@@ -54,6 +54,7 @@
         <item>
             <key> <string>_body</string> </key>
             <value> <string>from AccessControl import getSecurityManager\n
+from Products.ERP5Type.Message import translateString\n
 \n
 request = context.REQUEST\n
 new_password = request.get("new_password")\n
@@ -64,14 +65,16 @@
 person = persons[0]\n
 \n
 if not person.checkPassword(former_password):\n
-  msg = "Current password is wrong."\n
+  msg = translateString("Current password is wrong.")\n
 else:\n
-  msg = "Password changed."\n
+  msg = translateString("Password changed.")\n
   person.setPassword(new_password)\n
 \n
-ret_url = \'/\'.join([context.absolute_url(), request.get(\'form_id\', \'view\')])\n
-response = request.response\n
-response.redirect("%s?portal_status_message=%s" % (ret_url, msg))\n
+# clear erp5_content_short cache (see _authenticateCredentials in Products.ERP5Security.ERP5UserManager)\n
+context.portal_caches.clearCache((\'erp5_content_short\',))\n
+\n
+return context.Base_redirect(form_id,\n
+                  keep_items=dict(portal_status_message=msg))\n
 </string> </value>
         </item>
         <item>
@@ -82,7 +85,7 @@
         </item>
         <item>
             <key> <string>_params</string> </key>
-            <value> <string>**kw</string> </value>
+            <value> <string>form_id=\'view\', **kw</string> </value>
         </item>
         <item>
             <key> <string>_proxy_roles</string> </key>
@@ -110,15 +113,18 @@
                   <dictionary>
                     <item>
                         <key> <string>co_argcount</string> </key>
-                        <value> <int>0</int> </value>
+                        <value> <int>1</int> </value>
                     </item>
                     <item>
                         <key> <string>co_varnames</string> </key>
                         <value>
                           <tuple>
+                            <string>form_id</string>
                             <string>kw</string>
                             <string>AccessControl</string>
                             <string>getSecurityManager</string>
+                            <string>Products.ERP5Type.Message</string>
+                            <string>translateString</string>
                             <string>_getattr_</string>
                             <string>context</string>
                             <string>request</string>
@@ -129,8 +135,7 @@
                             <string>_getitem_</string>
                             <string>person</string>
                             <string>msg</string>
-                            <string>ret_url</string>
-                            <string>response</string>
+                            <string>dict</string>
                           </tuple>
                         </value>
                     </item>
@@ -142,7 +147,9 @@
         <item>
             <key> <string>func_defaults</string> </key>
             <value>
-              <none/>
+              <tuple>
+                <string>view</string>
+              </tuple>
             </value>
         </item>
         <item>

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision?rev=24847&r1=24846&r2=24847&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] Tue Dec  9 13:14:53 2008
@@ -1,1 +1,1 @@
-1033
+1034




More information about the Erp5-report mailing list