[Erp5-report] r23752 - in /erp5/trunk/products/ERP5/bootstrap/erp5_core: SkinTemplateItem/p...
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Sep 23 10:27:18 CEST 2008
Author: jerome
Date: Tue Sep 23 10:27:14 2008
New Revision: 23752
URL: http://svn.erp5.org?rev=23752&view=rev
Log:
In r23242, the type of the portal was tested instead of the type of the context. Restore this and add some comments about how this script should behave when deleting templates inside a preference.
Modified:
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_delete.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_delete.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_delete.xml?rev=23752&r1=23751&r2=23752&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_delete.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_delete.xml Tue Sep 23 10:27:14 2008
@@ -116,6 +116,8 @@
history_dict = object.Base_getWorkflowHistory()\n
history_dict.pop(\'edit_workflow\', None)\n
if history_dict == {} or object.aq_parent.portal_type==\'Preference\':\n
+ # templates inside preference will be unconditionnaly physically\n
+ # deleted\n
object_to_remove_list.append(object)\n
else:\n
# If a workflow manage a history, \n
@@ -125,7 +127,9 @@
# Remove some objects\n
try:\n
if object_to_remove_list != []:\n
- if portal.portal_type==\'Preference\':\n
+ if context.portal_type == \'Preference\':\n
+ # Templates inside preference are not indexed, so we cannot pass\n
+ # uids= to manage_delObjects and have to use ids=\n
context.manage_delObjects(\n
ids=[x.getId() for x in object_to_remove_list],\n
REQUEST=REQUEST)\n
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=23752&r1=23751&r2=23752&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision Tue Sep 23 10:27:14 2008
@@ -1,1 +1,1 @@
-963
+964
More information about the Erp5-report
mailing list