Back to index

moin  1.9.0~rc2
Functions
MoinMoin.action.quickunlink Namespace Reference

Functions

def execute

Function Documentation

def MoinMoin.action.quickunlink.execute (   pagename,
  request 
)
Remove the current wiki page from the user's quicklinks 

Definition at line 11 of file quickunlink.py.

00011 
00012 def execute(pagename, request):
00013     """ Remove the current wiki page from the user's quicklinks """
00014     _ = request.getText
00015     msg = None
00016 
00017     if not request.user.valid:
00018         msg = _("You must login to remove a quicklink.")
00019     elif request.user.isQuickLinkedTo([pagename]):
00020         if request.user.removeQuicklink(pagename):
00021             msg = _('Your quicklink to this page has been removed.')
00022         else: # should not happen
00023             msg = _('Your quicklink to this page could not be removed.')
00024     else:
00025         msg = _('You need to have a quicklink to this page to remove it.')
00026     if msg:
00027         request.theme.add_msg(msg)
00028     Page(request, pagename).send_page()
00029