changeset 1881:f96a8fa611e8

revert:cache refreshed
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Mon, 12 Mar 2007 20:24:44 +0100
parents b07b4c102d3d
children b5a68f95a5a3
files MoinMoin/action/revert.py
diffstat 1 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/revert.py	Mon Mar 12 14:10:45 2007 +0100
+++ b/MoinMoin/action/revert.py	Mon Mar 12 20:24:44 2007 +0100
@@ -24,7 +24,7 @@
                 'then call revert to this (older) revision again.')
     else:
         newpg = PageEditor(request, pagename)
-    
+
         revstr = '%08d' % rev
         try:
             msg = newpg.saveText(pg.get_raw_body(), 0, extra=revstr, action="SAVE/REVERT")
@@ -32,4 +32,13 @@
         except newpg.SaveError, msg:
             msg = unicode(msg)
         request.reset()
+
+        key = request.form.get('key', ['text_html'])[0]
+
+        # Remove cache entry (if exists)
+        pg = Page(request, pagename)
+        from MoinMoin import caching
+        caching.CacheEntry(request, pg, key, scope='item').remove()
+        caching.CacheEntry(request, pg, "pagelinks", scope='item').remove()
+
     pg.send_page(msg=msg)