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

[ticket/11103] Topic/Post in queue notification

Also, bug fixes and cleanup

PHPBB3-11103
This commit is contained in:
Nathan Guse
2012-09-15 14:33:15 -05:00
parent 05b573ebf7
commit 7454d5c2d5
16 changed files with 325 additions and 56 deletions

View File

@@ -2220,10 +2220,9 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
}
// Send Notifications
$phpbb_notifications = $phpbb_container->get('notifications');
if ($post_approval)
{
$phpbb_notifications = $phpbb_container->get('notifications');
switch ($mode)
{
case 'post' :
@@ -2258,6 +2257,34 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
break;
}
}
else
{
switch ($mode)
{
case 'post' :
$phpbb_notifications->add_notifications(array('topic_in_queue'), array_merge($data, array(
'post_username' => $username,
'poster_id' => (int) $user->data['user_id'],
)));
break;
case 'reply' :
case 'quote' :
$phpbb_notifications->add_notifications(array('post_in_queue'), array_merge($data, array(
'post_username' => $username,
'poster_id' => (int) $user->data['user_id'],
)));
break;
case 'edit_topic' :
case 'edit_first_post' :
case 'edit' :
case 'edit_last_post' :
$phpbb_notifications->delete_notifications('topic', $data['topic_id']);
$phpbb_notifications->delete_notifications(array('quote', 'bookmark', 'post'), $data['post_id']);
break;
}
}
$params = $add_anchor = '';