changeset 1925:b198c7372ba8

update the page trail after successfully saving a page, needed for NewPage macro because it does not send the newly created page
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 01 Apr 2007 15:18:39 +0200
parents 5dc0896d145a
children 8b676947238a
files MoinMoin/PageEditor.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/PageEditor.py	Sun Apr 01 14:46:19 2007 +0200
+++ b/MoinMoin/PageEditor.py	Sun Apr 01 15:18:39 2007 +0200
@@ -1147,6 +1147,11 @@
                     else:
                         index.update_page(self.page_name)
 
+            # Update page trail with the page we just saved.
+            # This is needed for NewPage macro with backto because it does not
+            # send the page we just saved.
+            request.user.addTrail(self.page_name)
+
         # remove lock (forcibly if we were allowed to break it by the UI)
         # !!! this is a little fishy, since the lock owner might not notice
         # we broke his lock ==> but revision checking during preview will