comparison MoinMoin/formatter/text_html.py @ 1182:5de0dc972701

removed deprecated usage of apply()
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 14 Aug 2006 00:54:29 +0200
parents 97ce857bdebf
children bc84eae93f8c
comparison
equal deleted inserted replaced
1181:a7f8dceb4410 1182:5de0dc972701
171 171
172 hardspace = '&nbsp;' 172 hardspace = '&nbsp;'
173 indentspace = ' ' 173 indentspace = ' '
174 174
175 def __init__(self, request, **kw): 175 def __init__(self, request, **kw):
176 apply(FormatterBase.__init__, (self, request), kw) 176 FormatterBase.__init__(self, request, **kw)
177 177
178 # inline tags stack. When an inline tag is called, it goes into 178 # inline tags stack. When an inline tag is called, it goes into
179 # the stack. When a block element starts, all inline tags in 179 # the stack. When a block element starts, all inline tags in
180 # the stack are closed. 180 # the stack are closed.
181 self._inlineStack = [] 181 self._inlineStack = []
482 formatter.text_python will use an optimized call with a page!=None 482 formatter.text_python will use an optimized call with a page!=None
483 parameter. DO NOT USE THIS YOURSELF OR IT WILL BREAK. 483 parameter. DO NOT USE THIS YOURSELF OR IT WILL BREAK.
484 484
485 See wikiutil.link_tag() for possible keyword parameters. 485 See wikiutil.link_tag() for possible keyword parameters.
486 """ 486 """
487 apply(FormatterBase.pagelink, (self, on, pagename, page), kw) 487 FormatterBase.pagelink(self, on, pagename, page, **kw)
488 if page is None: 488 if page is None:
489 page = Page(self.request, pagename, formatter=self) 489 page = Page(self.request, pagename, formatter=self)
490 if self.request.user.show_nonexist_qm and on and not page.exists(): 490 if self.request.user.show_nonexist_qm and on and not page.exists():
491 self.pagelink_preclosed = True 491 self.pagelink_preclosed = True
492 return (page.link_to(self.request, on=1, **kw) + 492 return (page.link_to(self.request, on=1, **kw) +
508 if on: 508 if on:
509 if wikitail.find('#') > -1: 509 if wikitail.find('#') > -1:
510 wikitail, kw['anchor'] = wikitail.split('#', 1) 510 wikitail, kw['anchor'] = wikitail.split('#', 1)
511 wikitail = wikiutil.url_unquote(wikitail) 511 wikitail = wikiutil.url_unquote(wikitail)
512 try: # XXX this is the only place where we access self.page - do we need it? Crashes silently on actions! 512 try: # XXX this is the only place where we access self.page - do we need it? Crashes silently on actions!
513 return apply(self.pagelink, (on, wikiutil.AbsPageName(self.request, self.page.page_name, wikitail)), kw) 513 return self.pagelink(on, wikiutil.AbsPageName(self.request, self.page.page_name, wikitail), **kw)
514 except: 514 except:
515 return apply(self.pagelink, (on, wikitail), kw) 515 return self.pagelink(on, wikitail, **kw)
516 else: 516 else:
517 return self.pagelink(0) 517 return self.pagelink(0)
518 else: # return InterWiki hyperlink 518 else: # return InterWiki hyperlink
519 if on: 519 if on:
520 href = wikiutil.join_wiki(wikiurl, wikitail) 520 href = wikiutil.join_wiki(wikiurl, wikitail)