Attachment 'Page.py.patch'

Download

   1 diff -r 7e4b68c11362 MoinMoin/Page.py
   2 --- a/MoinMoin/Page.py	Tue Apr 29 16:25:39 2008 +0200
   3 +++ b/MoinMoin/Page.py	Fri May 02 10:32:26 2008 +0800
   4 @@ -547,19 +547,22 @@ class Page(object):
   5  
   6          result = None
   7          if not self.rev:
   8 -            log = self._last_edited(request)
   9 -            if log:
  10 -                editordata = log.getInterwikiEditorData(request)
  11 -                editor = editordata[1]
  12 -                if editordata[0] == 'interwiki':
  13 -                    editor = "%s:%s" % editordata[1]
  14 -                else: # 'ip'
  15 -                    editor = editordata[1]
  16 -                result = {
  17 -                    'timestamp': log.ed_time_usecs,
  18 -                    'editor': editor,
  19 -                }
  20 -                del log
  21 +            line = self._last_edited(request)
  22 +        else:
  23 +            from MoinMoin.logfile import editlog
  24 +            for line in editlog.EditLog(request, rootpagename=self.page_name):
  25 +                if int(line.rev) == self.rev:
  26 +                    break
  27 +        if line:
  28 +            editordata = line.getInterwikiEditorData(request)
  29 +            editor = editordata[1]
  30 +            if editordata[0] == 'interwiki':
  31 +                editor = "%s:%s" % editordata[1]
  32 +            result = {
  33 +                'timestamp': line.ed_time_usecs,
  34 +                'editor': editor,
  35 +            }
  36 +            del line
  37          if not result:
  38              version = self.mtime_usecs()
  39              result = {

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] (2008-05-02 02:38:13, 1.4 KB) [[attachment:Page.py.patch]]
  • [get | view] (2008-05-02 12:44:10, 2.1 KB) [[attachment:xmlrpcpageinfo.patch]]
 All files | Selected Files: delete move to page copy to page

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