Attachment 'packages_do_add_revision3.patch'

Download

   1 diff -r 1f6f713c526c MoinMoin/packages.py
   2 --- a/MoinMoin/packages.py	Sat Sep 13 15:46:51 2008 +0200
   3 +++ b/MoinMoin/packages.py	Sat Sep 13 18:20:47 2008 +0200
   4 @@ -292,21 +292,17 @@
   5          @param comment:  comment related to this revision (optional)
   6          @param trivial:  boolean, if it is a trivial edit
   7          """
   8 +        _ = self.request.getText
   9 +        trivial = str2boolean(trivial)
  10          if self.request.user.may.write(pagename):
  11 -            _ = self.request.getText
  12 -            trivial = str2boolean(trivial)
  13 -            uid = user.getUserId(self.request, author)
  14 -            theuser = user.User(self.request, uid)
  15 -            save_user = self.request.user
  16 -            self.request.user = theuser
  17 -            page = PageEditor(self.request, pagename, do_editor_backup=0, uid_override=author)
  18 +            page = PageEditor(self.request, pagename, do_editor_backup=0, uid_override=None)
  19              try:
  20                  page.saveText(self.extract_file(filename).decode("utf-8"), 0, trivial=trivial, comment=comment)
  21 -                self.msg += u"%(pagename)s added \n" % {"pagename": pagename}
  22              except PageEditor.Unchanged:
  23                  pass
  24 -            self.request.user = save_user
  25 -            page.clean_acl_cache()
  26 +            else:
  27 +                self.msg += u"%(pagename)s added \n" % {"pagename": pagename}
  28 +                page.clean_acl_cache()
  29          else:
  30              self.msg += u"action add revision: not enough rights - nothing done \n"
  31  

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-09-13 15:21:41, 1.9 KB) [[attachment:packages_do_add_revision.patch]]
  • [get | view] (2008-09-13 15:37:47, 1.4 KB) [[attachment:packages_do_add_revision2.patch]]
  • [get | view] (2008-09-13 16:21:34, 1.5 KB) [[attachment:packages_do_add_revision3.patch]]
  • [get | view] (2008-09-13 15:46:49, 5.6 KB) [[attachment:traceback.txt]]
 All files | Selected Files: delete move to page copy to page

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