diff options
author | Nathan Guse <nathaniel.guse@gmail.com> | 2012-09-15 14:33:15 -0500 |
---|---|---|
committer | Nathan Guse <nathaniel.guse@gmail.com> | 2012-09-15 14:33:15 -0500 |
commit | 7454d5c2d526f237bf24825b80edf6c9f1750fc6 (patch) | |
tree | 59ff36bf8d0ee581a1172a537ebb079dd058e3b1 /phpBB/includes/functions_posting.php | |
parent | 05b573ebf76c737f89deaefd22ce963aa910e5d1 (diff) | |
download | forums-7454d5c2d526f237bf24825b80edf6c9f1750fc6.tar forums-7454d5c2d526f237bf24825b80edf6c9f1750fc6.tar.gz forums-7454d5c2d526f237bf24825b80edf6c9f1750fc6.tar.bz2 forums-7454d5c2d526f237bf24825b80edf6c9f1750fc6.tar.xz forums-7454d5c2d526f237bf24825b80edf6c9f1750fc6.zip |
[ticket/11103] Topic/Post in queue notification
Also, bug fixes and cleanup
PHPBB3-11103
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r-- | phpBB/includes/functions_posting.php | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 6089ef0014..4dd840ad53 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -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 = ''; |