[Erp5-report] r26286 - in /erp5/trunk/products/ERP5/bootstrap/erp5_core: SkinTemplateItem/p...
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Apr 6 13:05:20 CEST 2009
Author: mame
Date: Mon Apr 6 13:05:18 2009
New Revision: 26286
URL: http://svn.erp5.org?rev=26286&view=rev
Log:
2009-04-06 mame
modified script so that every time id of a website is changed, the correct url is returned.
Modified:
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_edit.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_edit.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_edit.xml?rev=26286&r1=26285&r2=26286&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_edit.xml [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_edit.xml [utf8] Mon Apr 6 13:05:18 2009
@@ -67,7 +67,7 @@
from Products.Formulator.Errors import FormValidationError\n
from Products.CMFActivity.Errors import ActivityPendingError\n
\n
-request=context.REQUEST\n
+request=container.REQUEST\n
portal = context.getPortalObject()\n
Base_translateString = portal.Base_translateString\n
\n
@@ -254,6 +254,12 @@
\n
ignore_layout = int(ignore_layout)\n
editable_mode = int(editable_mode)\n
+spp = context.getPhysicalPath()\n
+spp =list(spp)\n
+s_url = request["SERVER_URL"]\n
+spp.insert(0,s_url)\n
+#calculate direct the url instead of using absolute_url\n
+new_url = \'/\'.join(spp)\n
\n
if not selection_index:\n
redirect_url = \'%s/%s?ignore_layout:int=%s&editable_mode:int=%s&portal_status_message=%s\' % (\n
@@ -262,6 +268,16 @@
ignore_layout,\n
editable_mode,\n
message)\n
+\n
+elif context.getPortalType()==\'Web Site\':\n
+ redirect_url = \'%s/%s?selection_index=%s&selection_name=%s&ignore_layout:int=%s&editable_mode=%s&portal_status_message=%s\' % (\n
+ new_url,\n
+ form_id,\n
+ selection_index,\n
+ selection_name,\n
+ ignore_layout,\n
+ editable_mode,\n
+ message)\n
else:\n
redirect_url = \'%s/%s?selection_index=%s&selection_name=%s&ignore_layout:int=%s&editable_mode=%s&portal_status_message=%s\' % (\n
context.absolute_url(),\n
@@ -272,7 +288,9 @@
editable_mode,\n
message)\n
\n
+\n
result = request[\'RESPONSE\'].redirect(redirect_url) \n
+\n
if silent_mode: return result, \'redirect\'\n
return result\n
@@ -326,8 +344,9 @@
<string>Products.CMFActivity.Errors</string>
<string>ActivityPendingError</string>
<string>_getattr_</string>
+ <string>container</string>
+ <string>request</string>
<string>context</string>
- <string>request</string>
<string>portal</string>
<string>Base_translateString</string>
<string>None</string>
@@ -359,6 +378,10 @@
<string>encapsulated_editor</string>
<string>e</string>
<string>int</string>
+ <string>spp</string>
+ <string>list</string>
+ <string>s_url</string>
+ <string>new_url</string>
<string>result</string>
</tuple>
</value>
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=26286&r1=26285&r2=26286&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] Mon Apr 6 13:05:18 2009
@@ -1,1 +1,1 @@
-1139
+1140
More information about the Erp5-report
mailing list