mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-04 07:47:34 +02:00
[ticket/11103] Notification grouping output for bookmark/quote
PHPBB3-11103
This commit is contained in:
@@ -107,6 +107,27 @@ class phpbb_notification_type_bookmark extends phpbb_notification_type_post
|
|||||||
}
|
}
|
||||||
$this->db->sql_freeresult($result);
|
$this->db->sql_freeresult($result);
|
||||||
|
|
||||||
|
// Try to find the users who already have been notified about replies and have not read the topic since and just update their notifications
|
||||||
|
$update_notifications = array();
|
||||||
|
$sql = 'SELECT *
|
||||||
|
FROM ' . NOTIFICATIONS_TABLE . "
|
||||||
|
WHERE item_type = '" . self::get_item_type() . "'
|
||||||
|
AND item_parent_id = " . (int) self::get_item_parent_id($post) . '
|
||||||
|
AND unread = 1';
|
||||||
|
$result = $this->db->sql_query($sql);
|
||||||
|
while ($row = $this->db->sql_fetchrow($result))
|
||||||
|
{
|
||||||
|
// Do not create a new notification
|
||||||
|
unset($notify_users[$row['user_id']]);
|
||||||
|
|
||||||
|
$notification = $this->notification_manager->get_item_type_class(self::get_item_type(), $row);
|
||||||
|
$sql = 'UPDATE ' . NOTIFICATIONS_TABLE . '
|
||||||
|
SET ' . $this->db->sql_build_array('UPDATE', $notification->add_responders($post)) . '
|
||||||
|
WHERE notification_id = ' . $row['notification_id'];
|
||||||
|
$this->db->sql_query($sql);
|
||||||
|
}
|
||||||
|
$this->db->sql_freeresult($result);
|
||||||
|
|
||||||
return $notify_users;
|
return $notify_users;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -126,6 +126,27 @@ class phpbb_notification_type_quote extends phpbb_notification_type_post
|
|||||||
}
|
}
|
||||||
$this->db->sql_freeresult($result);
|
$this->db->sql_freeresult($result);
|
||||||
|
|
||||||
|
// Try to find the users who already have been notified about replies and have not read the topic since and just update their notifications
|
||||||
|
$update_notifications = array();
|
||||||
|
$sql = 'SELECT *
|
||||||
|
FROM ' . NOTIFICATIONS_TABLE . "
|
||||||
|
WHERE item_type = '" . self::get_item_type() . "'
|
||||||
|
AND item_parent_id = " . (int) self::get_item_parent_id($post) . '
|
||||||
|
AND unread = 1';
|
||||||
|
$result = $this->db->sql_query($sql);
|
||||||
|
while ($row = $this->db->sql_fetchrow($result))
|
||||||
|
{
|
||||||
|
// Do not create a new notification
|
||||||
|
unset($notify_users[$row['user_id']]);
|
||||||
|
|
||||||
|
$notification = $this->notification_manager->get_item_type_class(self::get_item_type(), $row);
|
||||||
|
$sql = 'UPDATE ' . NOTIFICATIONS_TABLE . '
|
||||||
|
SET ' . $this->db->sql_build_array('UPDATE', $notification->add_responders($post)) . '
|
||||||
|
WHERE notification_id = ' . $row['notification_id'];
|
||||||
|
$this->db->sql_query($sql);
|
||||||
|
}
|
||||||
|
$this->db->sql_freeresult($result);
|
||||||
|
|
||||||
return $notify_users;
|
return $notify_users;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user