Last change
on this file since 5156 was
805,
checked in by joachim, 18 years ago
|
propset Id
|
-
Property svn:keywords set to
Id
|
File size:
576 bytes
|
Rev | Line | |
---|
[588] | 1 | ## Script (Python) "folder_rename_items" |
---|
| 2 | ##bind container=container |
---|
| 3 | ##bind context=context |
---|
| 4 | ##bind namespace= |
---|
| 5 | ##bind script=script |
---|
| 6 | ##bind subpath=traverse_subpath |
---|
| 7 | ##parameters= |
---|
| 8 | ##title= |
---|
| 9 | ## |
---|
[805] | 10 | # $Id: academics_rename_items.py 805 2006-11-09 09:38:29Z joachim $ |
---|
[588] | 11 | """ |
---|
| 12 | Get the list of renameable objects from REQUEST's 'ids' list. |
---|
| 13 | """ |
---|
| 14 | |
---|
| 15 | # This is bad but we want to keep CMF 1.4's API for now |
---|
| 16 | REQUEST = context.REQUEST |
---|
| 17 | |
---|
| 18 | ids = REQUEST.get('ids', []) |
---|
| 19 | |
---|
| 20 | objects = [] |
---|
| 21 | for id in ids: |
---|
| 22 | ob = getattr(context.academics, id, None) |
---|
| 23 | if ob is None: |
---|
| 24 | continue |
---|
| 25 | if not ob.cb_isMoveable(): |
---|
| 26 | continue |
---|
| 27 | objects.append(ob) |
---|
| 28 | |
---|
| 29 | return objects |
---|
Note: See
TracBrowser for help on using the repository browser.