view MoinMoin/macro/ @ 3125:40c4670c3410

refactored auth package to use own logger
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Wed, 27 Feb 2008 10:05:20 +0100
parents b06ef2a53efa
children 09657fbd4aa2
line wrap: on
line source
# -*- coding: iso-8859-1 -*-
    MoinMoin - Create an action link

    @copyright: 2004 Johannes Berg <>
    @license: GNU GPL, see COPYING for details.

Dependencies = ["language"]

def execute(self, args):
    result = ''
    # we don't want to spend much CPU for spiders requesting nonexisting pages
    if not self.request.isSpiderAgent:
        # Get list of template pages readable by current user
        filterfn =
        templates = self.request.rootpage.getPageList(filter=filterfn)
        result = []
        if templates:
            page =
            # send list of template pages
            for template in templates:
                result.append(page.link_to(self.request, template, querystr={'action': 'edit', 'template': template}))
        result = ''.join(result)
    return result