diff MoinMoin/action/AttachFile.py @ 1473:b5864c9492fb

ensure new attachments trigger an index update, doc update for MoinMoin.search.Xapian
author Franz Pletz <fpletz AT franz-pletz DOT org>
date Wed, 23 Aug 2006 22:48:01 +0200
parents 760002b5ffa3
children b1562b232683
line wrap: on
line diff
--- a/MoinMoin/action/AttachFile.py	Wed Aug 23 21:14:09 2006 +0200
+++ b/MoinMoin/action/AttachFile.py	Wed Aug 23 22:48:01 2006 +0200
@@ -192,6 +192,12 @@
 
         _addLogEntry(request, 'ATTNEW', pagename, target)
 
+        if request.cfg.xapian_search:
+            from MoinMoin.search.Xapian import Index
+            index = Index(request)
+            if index.exists():
+                index.update_page(pagename)
+
         return target