1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-04 07:47:34 +02:00

[ticket/11103] Update notifications on post/topic edit

PHPBB3-11103
This commit is contained in:
Nathan Guse
2012-09-09 14:55:40 -05:00
parent 3624d2c50a
commit e09f25d597
4 changed files with 34 additions and 13 deletions

View File

@@ -2220,12 +2220,18 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
}
// Send Notifications
if (($mode == 'reply' || $mode == 'quote' || $mode == 'post') && $post_approval)
if ($post_approval)
{
$notifications = $phpbb_container->get('notifications');
switch ($mode)
{
case 'post' :
$notifications->add_notifications('topic', array_merge($data, array(
'post_username' => $username,
)));
break;
case 'reply' :
case 'quote' :
$notifications->add_notifications('post', array_merge($data, array(
@@ -2233,8 +2239,15 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
)));
break;
case 'post' :
$notifications->add_notifications('topic', array_merge($data, array(
case 'edit_topic' :
case 'edit_first_post' :
case 'edit' :
case 'edit_last_post' :
$notifications->update_notifications('topic', array_merge($data, array(
'post_username' => $username,
'topic_title' => $subject,
)));
$notifications->update_notifications('post', array_merge($data, array(
'post_username' => $username,
)));
break;