view MoinMoin/action/ @ 5522:879674c9320a

AttachFile: add ticketing for all operations that do modifications Tickets for upload (POST), also for every (GET) URL except do=get and do=view. Avoid KeyError if there is no ticket (was a minor issues, because there has to be one). Use the same i18n string for all "Please use the interactive user interface" messages.
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 08 Feb 2010 18:56:07 +0100
parents 01f05e74aa9c
children 85884c67228d
line wrap: on
line source
# -*- coding: iso-8859-1 -*-
    MoinMoin - "titleindex" action

    This action generates a plain list of pages, so that other wikis
    can implement more

    @copyright: 2001 Juergen Hermann <>
    @license: GNU GPL, see COPYING for details.

from MoinMoin import config, util

def execute(pagename, request):
    form = request.form

    # get the MIME type
    if 'mimetype' in form:
        mimetype = form['mimetype'][0]
        mimetype = "text/plain"

    request.emit_http_headers(["Content-Type: %s; charset=%s" % (mimetype, config.charset)])

    # Get list of user readable pages
    pages = request.rootpage.getPageList()

    if mimetype == "text/xml":
        request.write('<?xml version="1.0" encoding="%s"?>\r\n' % (config.charset, ))
        for name in pages:
            request.write('  <Title>%s</Title>\r\n' % (util.TranslateCDATA(name), ))
        for name in pages: