view MoinMoin/action/ @ 2374:629dea07759f

do not parse single-quoted page names as quoted fixes bugs with ['text_html'] being a link
author Johannes Berg <johannes AT sipsolutions DOT net>
date Thu, 12 Jul 2007 14:40:06 +0200
parents 1b14cc05a54a
children ba14d391c2ba
line wrap: on
line source
# -*- coding: iso-8859-1 -*-
    MoinMoin - logout action

    The real logout is done in MoinMoin.request.
    Here is just some stuff to notify the user.

    @copyright: 2005-2006 Radomirs Cirskis <>
    @license: GNU GPL, see COPYING for details.

from MoinMoin.Page import Page

def execute(pagename, request):
    return LogoutHandler(pagename, request).handle()

class LogoutHandler:
    def __init__(self, pagename, request):
        self.request = request
        self._ = request.getText = Page(request, pagename)

    def handle(self):
        _ = self._
        # if the user really was logged out say so,
        # but if the user manually added ?action=logout
        # and that isn't really supported, then don't
        if not self.request.user.valid:
            message = _("You are now logged out.")
            message = None