Last change
on this file since 616 was
588,
checked in by joachim, 18 years ago
|
missing academics_rename_items.py
|
File size:
638 bytes
|
Line | |
---|
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 | ## |
---|
10 | # $Id: folder_rename_items.py 7215 2005-03-03 13:58:20Z sfermigier $ |
---|
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.