Last change
on this file since 12407 was
3078,
checked in by Henrik Bettermann, 17 years ago
|
forgotten
|
-
Property svn:keywords set to
Id
|
File size:
800 bytes
|
Line | |
---|
1 | ## Script (Python) "archive_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: archive_delete.py 3078 2008-01-31 22:05:54Z henrik $ |
---|
11 | """ |
---|
12 | archive and delte PIN batches |
---|
13 | """ |
---|
14 | |
---|
15 | import logging |
---|
16 | logger = logging.getLogger('Skins.archive_delete') |
---|
17 | member_id = str(context.portal_membership.getAuthenticatedMember()) |
---|
18 | |
---|
19 | if ids: |
---|
20 | for id in ids: |
---|
21 | ob = getattr(context, id) |
---|
22 | ob['archiveBatch'](delete=True) |
---|
23 | message = 'portal_status_message=%s archived and deleted!' % ' '.join(ids) |
---|
24 | context.manage_delObjects(ids) |
---|
25 | else: |
---|
26 | message = 'portal_status_message=Select at least one batch to archive and delete!' |
---|
27 | |
---|
28 | if REQUEST is not None: |
---|
29 | return REQUEST.RESPONSE.redirect("%s?%s" % (context.absolute_url(), message)) |
---|
30 | |
---|
Note: See
TracBrowser for help on using the repository browser.