Last change
on this file since 17367 was
3077,
checked in by Henrik Bettermann, 17 years ago
|
archiveBatch fixed (Joachim, wie konnte das bei dir funktionieren??)
archive file reorganized
pins_view and psm beautified
|
-
Property svn:keywords set to
Id
|
File size:
793 bytes
|
Line | |
---|
1 | ## Script (Python) "archive" |
---|
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.py 3077 2008-01-31 22:05:11Z henrik $ |
---|
11 | """ |
---|
12 | FIXME: add docstring. |
---|
13 | """ |
---|
14 | try: |
---|
15 | from Products.zdb import set_trace |
---|
16 | except: |
---|
17 | def set_trace(): |
---|
18 | pass |
---|
19 | |
---|
20 | import logging |
---|
21 | logger = logging.getLogger('Skins.archive') |
---|
22 | member_id = str(context.portal_membership.getAuthenticatedMember()) |
---|
23 | if ids: |
---|
24 | for id in ids: |
---|
25 | ob = getattr(context, id) |
---|
26 | ob['archiveBatch']() |
---|
27 | message = 'portal_status_message=%s archived!' % ' '.join(ids) |
---|
28 | else: |
---|
29 | message = 'portal_status_message=Select at least one batch to archive!' |
---|
30 | |
---|
31 | if REQUEST is not None: |
---|
32 | return REQUEST.RESPONSE.redirect("%s?%s" % (context.absolute_url(), message)) |
---|
Note: See
TracBrowser for help on using the repository browser.