changeset 5327:501b170e3238

abort RenamePage if renaming of main page fails (do not try to rename subpages), thanks to Eugene Syromyatnikov
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 29 Nov 2009 17:39:10 +0100
parents 1ba150d90d3a
children 9161bf60a745
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 16:58:27 2009 +0100
+++ b/MoinMoin/action/RenamePage.py	Sun Nov 29 17:39:10 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
         try:
             rename_subpages = int(form['rename_subpages'])