Attachment 'moin-title.patch'

Download

   1 --- Page.py.orig	2005-09-04 16:01:44.000000000 -0300
   2 +++ Page.py	2005-09-05 21:19:40.000000000 -0300
   3 @@ -301,6 +301,21 @@
   4          @rtype: unicode
   5          @return: pagename of this page, splitted into space separated words
   6          """
   7 +        if hasattr(self, "pi_title"):
   8 +            if self.pi_title:
   9 +                return self.pi_title
  10 +        else:
  11 +            header = self.getPageHeader()
  12 +            if header and "#title " in header:
  13 +                for line in header.splitlines():
  14 +                    verb, args = (line[1:]+' ').split(' ', 1)
  15 +                    verb = verb.lower()
  16 +                    args = args.strip()
  17 +                    if verb == "title":
  18 +                        self.pi_title = args
  19 +                return self.pi_title
  20 +            else:
  21 +                self.pi_title = None
  22          if not force and not request.user.wikiname_add_spaces:
  23              return self.page_name
  24  
  25 @@ -933,6 +948,7 @@
  26          # default is wiki markup
  27          pi_format = self.cfg.default_markup or "wiki"
  28          pi_formatargs = ''
  29 +        pi_title = None
  30          pi_redirect = None
  31          pi_refresh = None
  32          pi_formtext = []
  33 @@ -971,6 +987,9 @@
  34                  pi_format, pi_formatargs = (args+' ').split(' ',1)
  35                  pi_format = pi_format.lower()
  36                  pi_formatargs = pi_formatargs.strip()
  37 +            elif verb == "title":
  38 +                # page title
  39 +                pi_title = args
  40              elif verb == "refresh":
  41                  if self.cfg.refresh:
  42                      try:
  43 @@ -1054,6 +1073,7 @@
  44  
  45          # Save values for later use
  46          self.pi_format = pi_format
  47 +        self.pi_title = pi_title
  48  
  49          # start document output
  50          doc_leader = self.formatter.startDocument(self.page_name)

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] (2005-10-24 18:57:18, 1.8 KB) [[attachment:moin-title.patch]]
 All files | Selected Files: delete move to page copy to page

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