Last change
on this file since 1593 was
1558,
checked in by joachim, 18 years ago
|
merged trunk up to 1557
|
-
Property svn:keywords set to
Id
|
File size:
747 bytes
|
Line | |
---|
1 | ## Script (Python) "folder_delete" |
---|
2 | ##bind container=container |
---|
3 | ##bind context=context |
---|
4 | ##bind namespace= |
---|
5 | ##bind script=script |
---|
6 | ##bind subpath=traverse_subpath |
---|
7 | ##parameters=ids=[], REQUEST=None |
---|
8 | ##title= |
---|
9 | ## |
---|
10 | # $Id: course_result_delete.py 1558 2007-03-15 16:44:41Z joachim $ |
---|
11 | """ |
---|
12 | FIXME: add docstring. |
---|
13 | """ |
---|
14 | |
---|
15 | from Products.CMFCore.utils import getToolByName |
---|
16 | here = context |
---|
17 | |
---|
18 | ret_url = here.absolute_url() |
---|
19 | |
---|
20 | message = '' |
---|
21 | if ids: |
---|
22 | real_ids = [] |
---|
23 | for id in ids: |
---|
24 | if context.hasObject(id): |
---|
25 | real_ids.append(id) |
---|
26 | if real_ids: |
---|
27 | context.manage_delObjects(real_ids) |
---|
28 | message = 'portal_status_message=psm_item(s)_deleted' |
---|
29 | else: |
---|
30 | message = 'portal_status_message=psm_select_at_least_one_document' |
---|
31 | |
---|
32 | if REQUEST is not None: |
---|
33 | return REQUEST.RESPONSE.redirect(ret_url + '?' + message) |
---|
Note: See
TracBrowser for help on using the repository browser.