mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/16544] Correctly mark notification read
PHPBB3-16544
This commit is contained in:
parent
02f54ef219
commit
8e2dd65c6e
2 changed files with 42 additions and 38 deletions
|
@ -580,6 +580,7 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $
|
|||
'notification.type.post',
|
||||
'notification.type.approve_topic',
|
||||
'notification.type.approve_post',
|
||||
'notification.type.forum',
|
||||
), false, $user->data['user_id'], $post_time);
|
||||
|
||||
if ($config['load_db_lastread'] && $user->data['is_registered'])
|
||||
|
@ -663,6 +664,7 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $
|
|||
'notification.type.bookmark',
|
||||
'notification.type.post',
|
||||
'notification.type.approve_post',
|
||||
'notification.type.forum',
|
||||
), $topic_ids, $user->data['user_id'], $post_time);
|
||||
|
||||
// Add 0 to forums array to mark global announcements correctly
|
||||
|
@ -773,6 +775,7 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $
|
|||
'notification.type.bookmark',
|
||||
'notification.type.post',
|
||||
'notification.type.approve_post',
|
||||
'notification.type.forum',
|
||||
), $topic_id, $user->data['user_id'], $post_time);
|
||||
|
||||
if ($config['load_db_lastread'] && $user->data['is_registered'])
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* This file is part of the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
*
|
||||
* This file is part of the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\notification\type;
|
||||
|
||||
/**
|
||||
* Forum notifications class
|
||||
* This class handles notifications for replies to a topic in a forum user subscribed to
|
||||
*/
|
||||
* Forum notifications class
|
||||
* This class handles notifications for replies to a topic in a forum user subscribed to
|
||||
*/
|
||||
|
||||
class forum extends \phpbb\notification\type\post
|
||||
{
|
||||
|
@ -33,7 +33,7 @@ class forum extends \phpbb\notification\type\post
|
|||
/**
|
||||
* Notification option data (for outputting to the user)
|
||||
*
|
||||
* @var bool|array False if the service should use it's default data
|
||||
* @var bool|array False if the service should use its default data
|
||||
* Array of data (including keys 'id', 'lang', and 'group')
|
||||
*/
|
||||
static public $notification_option = [
|
||||
|
@ -76,7 +76,8 @@ class forum extends \phpbb\notification\type\post
|
|||
return [];
|
||||
}
|
||||
|
||||
// Try to find the users who already have been notified about replies and have not read the topic since and just update their notifications
|
||||
// Try to find the users who already have been notified about replies and have not read them
|
||||
// Just update their notifications
|
||||
$notified_users = $this->notification_manager->get_notified_users($this->get_type(), [
|
||||
'item_parent_id' => static::get_item_parent_id($post),
|
||||
'read' => 0,
|
||||
|
|
Loading…
Add table
Reference in a new issue