/[pac]/pac/PACDefault/skins/pac_scripts/getAvailableActions.py
ViewVC logotype

Diff of /pac/PACDefault/skins/pac_scripts/getAvailableActions.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by tvon, Sun Oct 12 07:23:31 2003 UTC revision 1.3 by tvon, Thu Nov 6 00:07:08 2003 UTC
# Line 10  Line 10 
10  import string  import string
11    
12  # Total hack  # Total hack
 actions = context.portal_properties.pac_properties.getProperty('actions')  
13    
14  contents = context.portal_catalog(  contents = context.portal_catalog(
15          path=string.join(          path=string.join(context.getPhysicalPath(), '/')
             context.getPhysicalPath()[:-1],  
             '/')  
16          )          )
17    
18  result = []  result = []
19  for item in contents:  for item in contents:
20      if item.meta_type in actions:      if item.meta_type.find('Action') == 0:
21          result.append(item.UID)          result.append(item.UID)
       
22    
23    
24  return actions  return result

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26