changeset 3870:3a81ee4b66e8

merge fixes from 1.7 repo
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Fri, 18 Jul 2008 10:00:14 +0200
parents 44275a3436eb (current diff) 4f0dcb5fe7a6 (diff)
children 6e7ef632d9b3
files
diffstat 3 files changed, 6 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/revert.py	Wed Jul 16 22:48:33 2008 +0200
+++ b/MoinMoin/action/revert.py	Fri Jul 18 10:00:14 2008 +0200
@@ -3,7 +3,7 @@
     MoinMoin - revert a page to a previous revision
 
     @copyright: 2000-2004 Juergen Hermann <jh@web.de>,
-                2006 MoinMoin:ThomasWaldmann,
+                2006-2008 MoinMoin:ThomasWaldmann,
                 2007 MoinMoin:ReimarBauer,
                 2008 MoinMoin:JohannesBerg
     @license: GNU GPL, see COPYING for details.
@@ -30,7 +30,7 @@
         # as well
         _ = self._
         may = self.request.user.may
-        allowed = may.write(self.pagename) and may.delete(self.pagename)
+        allowed = may.write(self.pagename) and may.revert(self.pagename)
         return allowed, _('You are not allowed to revert this page!')
 
     def check_condition(self):
@@ -42,9 +42,6 @@
                      'If you want to revert to an older revision, first view that older revision and '
                      'then call revert to this (older) revision again.')
             return note
-
-        if not self.page.exists():
-            return _('This page is already deleted or was never created!')
         else:
             return None
 
--- a/MoinMoin/macro/MonthCalendar.py	Wed Jul 16 22:48:33 2008 +0200
+++ b/MoinMoin/macro/MonthCalendar.py	Fri Jul 18 10:00:14 2008 +0200
@@ -365,6 +365,7 @@
                             title = match.group(1)
                             title = wikiutil.escape(title).replace("'", "\\'")
                             titletext.append(title)
+                    link = wikiutil.escape(link).replace("'", "\\'")
                     tipname = link
                     tiptitle = link
                     tiptext = '<br>'.join(titletext)
--- a/MoinMoin/request/__init__.py	Wed Jul 16 22:48:33 2008 +0200
+++ b/MoinMoin/request/__init__.py	Fri Jul 18 10:00:14 2008 +0200
@@ -263,10 +263,11 @@
         if not limits:
             return False
 
+        if self.remote_addr.startswith('127.'): # localnet
+            return False
+
         validuser = self.user.valid
         current_id = validuser and self.user.name or self.remote_addr
-        if not validuser and current_id.startswith('127.'): # localnet
-            return False
         current_action = self.action
 
         default_limit = self.cfg.surge_action_limits.get('default', (30, 60))