aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_posting.php
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2014-04-10 14:26:41 -0700
committerNils Adermann <naderman@naderman.de>2014-04-10 14:26:41 -0700
commit3f74e5b88b196b1d5108c372977406f4417bbae4 (patch)
treee0287b1975c79344e804231ec95ed74b91cea704 /phpBB/includes/functions_posting.php
parent62fad6ae9b5218773094bdd9fe55cb08b63dc12d (diff)
parentc99584ec7b6b32439b4af9486cddd38bf30b64d4 (diff)
downloadforums-3f74e5b88b196b1d5108c372977406f4417bbae4.tar
forums-3f74e5b88b196b1d5108c372977406f4417bbae4.tar.gz
forums-3f74e5b88b196b1d5108c372977406f4417bbae4.tar.bz2
forums-3f74e5b88b196b1d5108c372977406f4417bbae4.tar.xz
forums-3f74e5b88b196b1d5108c372977406f4417bbae4.zip
Merge remote-tracking branch 'github-nickvergessen/ticket/12370' into develop-ascraeus
* github-nickvergessen/ticket/12370: [ticket/12370] Add unit tests for topic notifications [ticket/12370] Fix functional notification test and remove unneeded requests [ticket/12370] Do not delete topic notifications when the topic is visible
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r--phpBB/includes/functions_posting.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 6a0aedf8c6..79fcb892ef 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -2272,8 +2272,10 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
case 'edit_first_post':
case 'edit':
case 'edit_last_post':
- // @todo: Check whether these notification deletions are correct
- $phpbb_notifications->delete_notifications('topic', $data['topic_id']);
+ if ($data['topic_visibility'] != ITEM_APPROVED)
+ {
+ $phpbb_notifications->delete_notifications('topic', $data['topic_id']);
+ }
$phpbb_notifications->delete_notifications(array(
'quote',
@@ -2297,8 +2299,10 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
case 'edit_first_post':
case 'edit':
case 'edit_last_post':
- // @todo: Check whether these notification deletions are correct
- $phpbb_notifications->delete_notifications('topic', $data['topic_id']);
+ if ($data['topic_visibility'] != ITEM_APPROVED)
+ {
+ $phpbb_notifications->delete_notifications('topic', $data['topic_id']);
+ }
$phpbb_notifications->delete_notifications(array(
'quote',