Last change
on this file since 3385 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
|
Rev | Line | |
---|
[3076] | 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']() |
---|
[3077] | 27 | message = 'portal_status_message=%s archived!' % ' '.join(ids) |
---|
[3076] | 28 | else: |
---|
[3077] | 29 | message = 'portal_status_message=Select at least one batch to archive!' |
---|
[3076] | 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.