[Moin-devel] CVS: MoinMoin/action AttachFile.py,1.37,1.38

J?rgen Hermann jhermann at users.sourceforge.net
Wed Jun 12 14:10:07 EDT 2002


Update of /cvsroot/moin/MoinMoin/action
In directory usw-pr-cvs1:/tmp/cvs-serv11027/action

Modified Files:
	AttachFile.py 
Log Message:
More info on Python installation in "?test" pages; pass request
object to user object


Index: AttachFile.py
===================================================================
RCS file: /cvsroot/moin/MoinMoin/action/AttachFile.py,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -r1.37 -r1.38
*** AttachFile.py	22 May 2002 21:37:44 -0000	1.37
--- AttachFile.py	12 Jun 2002 21:09:48 -0000	1.38
***************
*** 95,99 ****
  #############################################################################
  
! def _addLogEntry(action, pagename, filename):
      """ Add an entry to the edit log on uploads and deletes.
  
--- 95,99 ----
  #############################################################################
  
! def _addLogEntry(request, action, pagename, filename):
      """ Add an entry to the edit log on uploads and deletes.
  
***************
*** 101,105 ****
      """
      from MoinMoin import editlog
!     log = editlog.makeLogStore()
      remote_name = os.environ.get('REMOTE_ADDR', '')
      log.addEntry(pagename, remote_name, time.time(),
--- 101,105 ----
      """
      from MoinMoin import editlog
!     log = editlog.makeLogStore(request)
      remote_name = os.environ.get('REMOTE_ADDR', '')
      log.addEntry(pagename, remote_name, time.time(),
***************
*** 367,371 ****
          msg = _("Attachment '%(target)s' (remote name '%(filename)s')"
                  " with %(bytes)d bytes saved.") % locals()
!         _addLogEntry('ATTNEW', pagename, target)
  
      # return attachment list
--- 367,371 ----
          msg = _("Attachment '%(target)s' (remote name '%(filename)s')"
                  " with %(bytes)d bytes saved.") % locals()
!         _addLogEntry(request, 'ATTNEW', pagename, target)
  
      # return attachment list
***************
*** 401,405 ****
  
      if ext == '.draw':
!         _addLogEntry('ATTDRW', pagename, basename + ext)
  
      savepath = os.path.join(getAttachDir(pagename), basename + ext)
--- 401,405 ----
  
      if ext == '.draw':
!         _addLogEntry(request, 'ATTDRW', pagename, basename + ext)
  
      savepath = os.path.join(getAttachDir(pagename), basename + ext)
***************
*** 418,422 ****
      # delete file
      os.remove(fpath)
!     _addLogEntry('ATTDEL', pagename, filename)
  
      upload_form(pagename, request, msg=_("Attachment '%(filename)s' deleted.") % locals())
--- 418,422 ----
      # delete file
      os.remove(fpath)
!     _addLogEntry(request, 'ATTDEL', pagename, filename)
  
      upload_form(pagename, request, msg=_("Attachment '%(filename)s' deleted.") % locals())





More information about the Moin-devel mailing list