view MoinMoin/macro/ @ 0:77665d8e2254

tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0 (automatically generated log message) imported from: moin--main--1.5--base-0
author Thomas Waldmann <>
date Thu, 22 Sep 2005 15:09:50 +0000
children 0bbc39b09f95
line wrap: on
line source

# -*- coding: iso-8859-1 -*-
    MoinMoin - Create list of LikePages

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

Dependencies = ['namespace']

from MoinMoin.action import LikePages

def execute(macro, args):
    request = macro.request
    pagename =
    # Get matches
    start, end, matches = LikePages.findMatches(pagename, request)

    # Render matches
    if matches and not isinstance(matches, (str, unicode)):
        import StringIO
        out = StringIO.StringIO()
        LikePages.showMatches(pagename, request, start, end, matches, False)
        return out.getvalue()
    return args