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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user