changeset 1863:5dd9f0eb99a7

PageEditor: _write_file sets request.rev for #preview now
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Fri, 09 Mar 2007 00:33:30 +0100
parents f2706da26773
children 05158c12c271
files MoinMoin/PageEditor.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/PageEditor.py	Fri Mar 09 00:04:57 2007 +0100
+++ b/MoinMoin/PageEditor.py	Fri Mar 09 00:33:30 2007 +0100
@@ -1016,6 +1016,10 @@
             f.write(revstr+'\n')
             f.close()
 
+            # we need to actualize the request.rev number here to get the right revision used for
+            # actions on newly saved pages (#preview)
+            request.rev = rev
+
             if not deleted:
                 # save to page file
                 pagefile = os.path.join(revdir, revstr)
@@ -1133,7 +1137,6 @@
         # save only if no error occurred (msg is empty)
         if not msg:
             # set success msg
-            request.rev += 1
             msg = _("Thank you for your changes. Your attention to detail is appreciated.")
 
             # determine action for edit log