1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 14:00:31 +02:00

[ticket/11103] Add/Update/Mark Read functions accept an array for the type

This saves a lot of code in some areas (where the same data is sent, just
for different types)

Notifications for bookmarks

PHPBB3-11103
This commit is contained in:
Nathan Guse
2012-09-14 16:54:20 -05:00
parent 1ab0c469e2
commit ed1ec8e720
8 changed files with 178 additions and 76 deletions

View File

@@ -2227,20 +2227,14 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
switch ($mode)
{
case 'post' :
$notifications->add_notifications('topic', array_merge($data, array(
'post_username' => $username,
)));
$notifications->add_notifications('quote', array_merge($data, array(
$notifications->add_notifications(array('topic', 'quote'), array_merge($data, array(
'post_username' => $username,
)));
break;
case 'reply' :
case 'quote' :
$notifications->add_notifications('post', array_merge($data, array(
'post_username' => $username,
)));
$notifications->add_notifications('quote', array_merge($data, array(
$notifications->add_notifications(array('quote', 'bookmark', 'post'), array_merge($data, array(
'post_username' => $username,
)));
break;
@@ -2253,10 +2247,8 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
'post_username' => $username,
'topic_title' => $subject,
)));
$notifications->update_notifications('post', array_merge($data, array(
'post_username' => $username,
)));
$notifications->update_notifications('quote', array_merge($data, array(
$notifications->update_notifications(array('quote', 'bookmark', 'post'), array_merge($data, array(
'post_username' => $username,
)));
break;