Back to index

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

Functions

def execute
def _emit

Function Documentation

def MoinMoin.action.links._emit (   request,
  pagename 
) [private]
Send pagename, encode it if it contains spaces

Definition at line 48 of file links.py.

00048 
00049 def _emit(request, pagename):
00050     """ Send pagename, encode it if it contains spaces
00051     """
00052     request.write(wikiutil.quoteWikinameURL(pagename))
00053 

Here is the caller graph for this function:

def MoinMoin.action.links.execute (   pagename,
  request 
)

Definition at line 12 of file links.py.

00012 
00013 def execute(pagename, request):
00014     _ = request.getText
00015     # get the MIME type
00016     mimetype = request.values.get('mimetype', 'text/html')
00017     request.mimetype = mimetype
00018 
00019     if mimetype == "text/html":
00020         request.theme.send_title(_('Full Link List for "%s"') % request.cfg.sitename)
00021         request.write('<pre>')
00022 
00023     # Get page dict readable by current user
00024     pages = request.rootpage.getPageDict()
00025     pagelist = pages.keys()
00026     pagelist.sort()
00027 
00028     for name in pagelist:
00029         if mimetype == "text/html":
00030             request.write(pages[name].link_to(request))
00031         else:
00032             _emit(request, name)
00033         for link in pages[name].getPageLinks(request):
00034             request.write(" ")
00035             if mimetype == "text/html":
00036                 if link in pages:
00037                     request.write(pages[link].link_to(request))
00038                 else:
00039                     _emit(request, link)
00040             else:
00041                 _emit(request, link)
00042         request.write('\n')
00043 
00044     if mimetype == "text/html":
00045         request.write('</pre>')
00046         request.theme.send_footer(pagename)
00047         request.theme.send_closing_html()

Here is the call graph for this function: