changeset 5336:2e749ba5050c

abort RenamePage if renaming of main page fails (do not try to rename subpages), thanks to Eugene Syromyatnikov (backported from 1.9)
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Thu, 03 Dec 2009 13:15:55 +0100
parents b62463fa39ae
children 279e51998982
files MoinMoin/action/RenamePage.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/RenamePage.py	Sun Nov 29 22:28:05 2009 +0100
+++ b/MoinMoin/action/RenamePage.py	Thu Dec 03 13:15:55 2009 +0100
@@ -53,6 +53,9 @@
         self.page = PageEditor(self.request, self.pagename)
         success, msgs = self.page.renamePage(newpagename, comment)
 
+        if not success:
+            return success, msgs
+
         rename_subpages = 0
         if 'rename_subpages' in form:
             try: