aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_posting.php
diff options
context:
space:
mode:
authorNathan Guse <nathaniel.guse@gmail.com>2012-09-09 14:55:40 -0500
committerNathan Guse <nathaniel.guse@gmail.com>2012-09-09 14:55:40 -0500
commite09f25d59707fc842b073fa2909cefc3d16ecbf3 (patch)
treea5be17c213f92b9a6bf23345ed9fcf4b15eda8e0 /phpBB/includes/functions_posting.php
parent3624d2c50ac1acca767c5642767102b97fd6b832 (diff)
downloadforums-e09f25d59707fc842b073fa2909cefc3d16ecbf3.tar
forums-e09f25d59707fc842b073fa2909cefc3d16ecbf3.tar.gz
forums-e09f25d59707fc842b073fa2909cefc3d16ecbf3.tar.bz2
forums-e09f25d59707fc842b073fa2909cefc3d16ecbf3.tar.xz
forums-e09f25d59707fc842b073fa2909cefc3d16ecbf3.zip
[ticket/11103] Update notifications on post/topic edit
PHPBB3-11103
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r--phpBB/includes/functions_posting.php19
1 files changed, 16 insertions, 3 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 6c5c4535a3..64840bfa51 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -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;