In
vault/core/controller/dm/page/vw.php, find:
Code:
if ($updown AND !$this->instance->get_info('is_automated'))
Replace with:
Code:
if ($updown > 0 AND !$this->instance->get_info('is_automated'))
This wraps the ::notify_subscribed() method. $updown is negative when visible content deleted or unapproved. Failure to check whether the value was positive had led to instant subscription notifications being sent. Since subscriptions are only expected to be sent due to a page when the page is created or approved, the notification used the 'create' language.
It is likely you only received 2 alerts because the 3rd item was still awaiting moderation when it was deleted.
So the real bug was not 1, 2, or 3, but rather that subscriber notifications were triggered by this action.
A similar issue occurs when a new discussion is deleted/unapproved on a wiki page. In
vault/core/controller/dm/discussion/vw.php, find:
Code:
else
{
$this->notify_subscribed();
}
Replace with:
Code:
else if ($updown > 0)
{
$this->notify_subscribed();
}
And when a new version of an existing attachment is deleted/unapproved. In
vault/core/controller/dm/attach/edit/vw.php, find:
Code:
if ($updown AND vw_Hard_Core::model('Settings')->get('vw_sub_edit'))
{
$this->notify_subscribed();
}
Replace with:
Code:
if ($updown > 0 AND vw_Hard_Core::model('Settings')->get('vw_sub_edit'))
{
$this->notify_subscribed();
}
Going though, I've noticed some other issues with subscriptions, such as existing pages being added as new entries in books, categories, etc possibly not triggering notifications in the book, category, etc.