01159: EnableNotify may generate repeated emails if not EnableDirectDownload

Summary: EnableNotify may generate repeated emails if not EnableDirectDownload
Created: 2009-12-31 01:16
Status: Closed - workaround
Category: Bug
From: Rik Blok?
Assigned:
Priority: 3
Version: 2.2.8
OS: 5.2.11

Description: After enabling notifications I get emailed multiple notifications after each change. The messages are all identical and correct. The only problem is that they are repeats. It appears to occur because I have uploaded images in my pages and I have $EnableDirectDownload=0. So displaying each image with Attach:image.gif spawns a new instance of pmwiki.php before the notification file is wiped. Each instance sees the pending notifications and sends an email.

The issue is probably related to this thread: http://www.pmichaud.com/pipermail/pmwiki-users/2008-February/049073.html.

Workaround

Disabling notifications for downloads seems to workaround this bug:

if ($action != 'download') $EnableNotify=1; // disabled for downloads