1
# -*- coding: iso-8859-1 -*-
3
MoinMoin - remove a quicklink from the user's quicklinks
5
@copyright: 2000-2004 Juergen Hermann <jh@web.de>,
6
2006 MoinMoin:ThomasWaldmann
7
@license: GNU GPL, see COPYING for details.
9
from MoinMoin.Page import Page
11
def execute(pagename, request):
12
""" Remove the current wiki page from the user's quicklinks """
16
if not request.user.valid:
17
msg = _("You must login to remove a quicklink.")
18
elif request.user.isQuickLinkedTo([pagename]):
19
if request.user.removeQuicklink(pagename):
20
msg = _('Your quicklink to this page has been removed.')
21
else: # should not happen
22
msg = _('Your quicklink to this page could not be removed.')
24
msg = _('You need to have a quicklink to this page to remove it.')
26
Page(request, pagename).send_page(msg=msg)