view MoinMoin/macro/ @ 3085:fdb68a8f92da

fix wrong pagename when creating new pages on Mac OS X (ported from 1.6)
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 23 Feb 2008 00:28:53 +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