comparison MoinMoin/PageEditor.py @ 1895:46e859ee4d2e

edit: set request.rev to default after saving for further actions
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Sun, 18 Mar 2007 21:46:32 +0100
parents 5ae7a098f6e4
children 1de612a8c553
comparison
equal deleted inserted replaced
1894:5ae7a098f6e4 1895:46e859ee4d2e
993 rev += 1 993 rev += 1
994 revstr = '%08d' % rev 994 revstr = '%08d' % rev
995 f = file(clfn, 'w') 995 f = file(clfn, 'w')
996 f.write(revstr+'\n') 996 f.write(revstr+'\n')
997 f.close() 997 f.close()
998
999 # we need to update request.rev here to get the right revision used for
1000 # action links rendered by the final send_page() call (#preview display)
1001 # XXX this is not the right place to do this as you could use this function
1002 # to save any other page than the currently displayed one
1003 #request.rev = rev
1004 998
1005 if not deleted: 999 if not deleted:
1006 # save to page file 1000 # save to page file
1007 pagefile = os.path.join(revdir, revstr) 1001 pagefile = os.path.join(revdir, revstr)
1008 f = codecs.open(pagefile, 'wb', config.charset) 1002 f = codecs.open(pagefile, 'wb', config.charset)