Attachment 'isTemplatePage.patch'

Download

   1 diff -r efde74175d2d MoinMoin/wikiutil.py
   2 --- a/MoinMoin/wikiutil.py	Sat Apr 25 00:45:21 2009 +0200
   3 +++ b/MoinMoin/wikiutil.py	Sat Apr 25 21:59:00 2009 +0200
   4 @@ -627,9 +627,16 @@
   5  
   6      @param pagename: the page name
   7      @rtype: bool
   8 -    @return: true if page is a template page
   9 +    @return: true if page is a template page or the translation of the page is a template page
  10      """
  11 -    return request.cfg.cache.page_template_regexact.search(pagename) is not None
  12 +    from MoinMoin import i18n
  13 +    en_pagename = ''
  14 +    try:
  15 +        en_pagename = i18n.system_pages[pagename][1]
  16 +    except KeyError:
  17 +        pass
  18 +
  19 +    return en_pagename.endswith('Template') or request.cfg.cache.page_template_regexact.search(pagename) is not None
  20  
  21  
  22  def isGroupPage(pagename, cfg):

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2009-04-25 20:01:50, 0.8 KB) [[attachment:isTemplatePage.patch]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.