changeset 2200:e60ae8a23a49

macro.Action: getValidAction uses builtin actions too
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Sun, 06 May 2007 18:34:37 +0200
parents 2560c2182307
children 4ef3b19e11e5
files MoinMoin/macro/Action.py
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/macro/Action.py	Sun May 06 17:52:08 2007 +0200
+++ b/MoinMoin/macro/Action.py	Sun May 06 18:34:37 2007 +0200
@@ -13,6 +13,7 @@
         Same with custom text.
 
     @copyright: 2004 Johannes Berg <johannes@sipsolutions.de>
+                2007 by MoinMoin:ReimarBauer
     @license: GNU GPL, see COPYING for details.
 """
 
@@ -34,10 +35,16 @@
     def getValidActions(self):  
         """ lists all valid actions """
         from MoinMoin import action
-        actions = [x for x in action.modules
+        # builtin
+        actions = action.names
+        # global
+        glob_actions = [x for x in action.modules
                    if not x in self.macro.request.cfg.actions_excluded]
+        # local
         loc_actions = [x for x in wikiutil.wikiPlugins('action', self.macro.cfg)
                        if not x in self.macro.request.cfg.actions_excluded]
+        if glob_actions:
+            actions.append(glob_actions)
         if loc_actions:
             actions.append(loc_actions)
         return actions