[Moin-devel] CVS: MoinMoin Page.py,1.114,1.115 PageEditor.py,1.3,1.4 wikiaction.py,1.66,1.67

J?rgen Hermann jhermann at users.sourceforge.net
Wed Apr 17 13:34:10 EDT 2002


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

Modified Files:
	Page.py PageEditor.py wikiaction.py 
Log Message:
getPageLinks(request)


Index: Page.py
===================================================================
RCS file: /cvsroot/moin/MoinMoin/Page.py,v
retrieving revision 1.114
retrieving revision 1.115
diff -C2 -r1.114 -r1.115
*** Page.py	17 Apr 2002 19:54:35 -0000	1.114
--- Page.py	17 Apr 2002 20:33:33 -0000	1.115
***************
*** 415,419 ****
  
  
!     def getPageLinks(self):
          """Get a list of the links on this page"""
          if not self.exists(): return []
--- 415,419 ----
  
  
!     def getPageLinks(self, request):
          """Get a list of the links on this page"""
          if not self.exists(): return []

Index: PageEditor.py
===================================================================
RCS file: /cvsroot/moin/MoinMoin/PageEditor.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** PageEditor.py	16 Apr 2002 21:12:03 -0000	1.3
--- PageEditor.py	17 Apr 2002 20:33:33 -0000	1.4
***************
*** 201,209 ****
  
  
!     def deletePage(self):
          """Delete the page (but keep the backups)"""
          # First save a final backup copy of the current page
          # (recreating the page allows access to the backups again)
!         self.save_text("deleted", '0')
  
          # Then really delete it
--- 201,209 ----
  
  
!     def deletePage(self, request):
          """Delete the page (but keep the backups)"""
          # First save a final backup copy of the current page
          # (recreating the page allows access to the backups again)
!         self.save_text(request, "deleted", '0')
  
          # Then really delete it
***************
*** 221,230 ****
  
  
!     def notifySubscribers(self, comment):
          """ Send email to all subscribers of this page.
              Return message, indicating success or errors.
          """
          # extract categories of this page
!         pageList = self.getPageLinks()
          CATEGORY_RE = re.compile("^Category")
          pageList = filter(CATEGORY_RE.match, pageList)
--- 221,230 ----
  
  
!     def _notifySubscribers(self, request, comment):
          """ Send email to all subscribers of this page.
              Return message, indicating success or errors.
          """
          # extract categories of this page
!         pageList = self.getPageLinks(request)
          CATEGORY_RE = re.compile("^Category")
          pageList = filter(CATEGORY_RE.match, pageList)
***************
*** 362,366 ****
  
  
!     def save_text(self, newtext, datestamp, **kw):
          """ Save new text for a page.
  
--- 362,366 ----
  
  
!     def save_text(self, request, newtext, datestamp, **kw):
          """ Save new text for a page.
  
***************
*** 425,429 ****
              # send notification mails
              if config.mail_smarthost and kw.get('notify', 0):
!                 msg = msg + "<p>" + self.notifySubscribers(kw.get('comment', ''))
  
          return msg
--- 425,429 ----
              # send notification mails
              if config.mail_smarthost and kw.get('notify', 0):
!                 msg = msg + "<p>" + self._notifySubscribers(request, kw.get('comment', ''))
  
          return msg

Index: wikiaction.py
===================================================================
RCS file: /cvsroot/moin/MoinMoin/wikiaction.py,v
retrieving revision 1.66
retrieving revision 1.67
diff -C2 -r1.66 -r1.67
*** wikiaction.py	17 Apr 2002 19:54:35 -0000	1.66
--- wikiaction.py	17 Apr 2002 20:33:33 -0000	1.67
***************
*** 289,293 ****
  
      # show links
!     links = page.getPageLinks()
      if links:
          print _('This page links to the following pages:<br>')
--- 289,293 ----
  
      # show links
!     links = page.getPageLinks(request)
      if links:
          print _('This page links to the following pages:<br>')
***************
*** 434,438 ****
          pg.send_page(request.form, msg=_('Edit was cancelled.'))
      else:
!         savemsg = pg.save_text(savetext, datestamp,
              stripspaces=rstrip, notify=notify, comment=comment)
          pg.send_page(request.form, msg=savemsg)
--- 434,438 ----
          pg.send_page(request.form, msg=_('Edit was cancelled.'))
      else:
!         savemsg = pg.save_text(request, savetext, datestamp,
              stripspaces=rstrip, notify=notify, comment=comment)
          pg.send_page(request.form, msg=savemsg)





More information about the Moin-devel mailing list