diff MoinMoin/action/AttachFile.py @ 2490:111868e5cb21

Regenerate xapian index on added attachment, fix PageDeletedEvent, fix header
author Karol 'grzywacz' Nowak <grzywacz@sul.uni.lodz.pl>
date Sun, 22 Jul 2007 03:51:10 +0200
parents 1d60f9aa07d1
children b257d7bc96ff
line wrap: on
line diff
--- a/MoinMoin/action/AttachFile.py	Sun Jul 22 03:27:22 2007 +0200
+++ b/MoinMoin/action/AttachFile.py	Sun Jul 22 03:51:10 2007 +0200
@@ -27,6 +27,7 @@
 """
 
 import os, time, zipfile, mimetypes
+
 from MoinMoin import config, wikiutil, packages
 from MoinMoin.Page import Page
 from MoinMoin.util import filesys, timefuncs
@@ -223,22 +224,7 @@
         _addLogEntry(request, 'ATTNEW', pagename, target)
 
         event = FileAttachedEvent(request, pagename, target, len(filecontent))
-        results = send_event(event)
-
-        recipients = []
-        for result in results:
-            if isinstance(results, notification.Success):
-                recipients.append(result.recipient)
-
-        if recipients:
-            info = _("Notifications sent to:")
-            msg = msg + "<p>%s %s</p>" % (info, ",".join(recipients))
-
-        if request.cfg.xapian_search:
-            from MoinMoin.search.Xapian import Index
-            index = Index(request)
-            if index.exists():
-                index.update_page(pagename)
+        send_event(event)
 
         return target