1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-09 10:16:36 +02:00

[ticket/16955] Clean up variable names and docblocks in notifications

PHPBB3-16955
This commit is contained in:
Marc Alexander
2022-12-26 14:49:18 +01:00
parent 733f4e2530
commit 96911b7403
25 changed files with 235 additions and 202 deletions

View File

@@ -126,7 +126,7 @@ class email extends \phpbb\notification\method\messenger_base
public function mark_notifications($notification_type_id, $item_id, $user_id, $time = false, $mark_read = true)
{
$sql = 'DELETE FROM ' . $this->notification_emails_table . '
WHERE ' . ($notification_type_id !== false ? $this->db->sql_in_set('notification_type_id', $notification_type_id) : '1=1') .
WHERE ' . ($notification_type_id !== false ? $this->db->sql_in_set('notification_type_id', is_array($notification_type_id) ? $notification_type_id : [$notification_type_id]) : '1=1') .
($user_id !== false ? ' AND ' . $this->db->sql_in_set('user_id', $user_id) : '') .
($item_id !== false ? ' AND ' . $this->db->sql_in_set('item_id', $item_id) : '');
$this->db->sql_query($sql);
@@ -138,7 +138,7 @@ class email extends \phpbb\notification\method\messenger_base
public function mark_notifications_by_parent($notification_type_id, $item_parent_id, $user_id, $time = false, $mark_read = true)
{
$sql = 'DELETE FROM ' . $this->notification_emails_table . '
WHERE ' . ($notification_type_id !== false ? $this->db->sql_in_set('notification_type_id', $notification_type_id) : '1=1') .
WHERE ' . ($notification_type_id !== false ? $this->db->sql_in_set('notification_type_id', is_array($notification_type_id) ? $notification_type_id : [$notification_type_id]) : '1=1') .
($user_id !== false ? ' AND ' . $this->db->sql_in_set('user_id', $user_id) : '') .
($item_parent_id !== false ? ' AND ' . $this->db->sql_in_set('item_parent_id', $item_parent_id, false, true) : '');
$this->db->sql_query($sql);

View File

@@ -63,7 +63,7 @@ abstract class messenger_base extends \phpbb\notification\method\base
* @param int $notify_method Notify method for messenger (e.g. NOTIFY_IM)
* @param string $template_dir_prefix Base directory to prepend to the email template name
*
* @return null
* @return void
*/
protected function notify_using_messenger($notify_method, $template_dir_prefix = '')
{

View File

@@ -102,7 +102,7 @@ interface method_interface
/**
* Mark notifications read or unread from a parent identifier
*
* @param string $notification_type_id Type identifier of item types
* @param string|int|array $notification_type_id Type identifier of item types
* @param bool|int|array $item_parent_id Item parent id or array of item parent ids. False to mark read for all item parent ids
* @param bool|int|array $user_id User id or array of user ids. False to mark read for all user ids
* @param bool|int $time Time at which to mark all notifications prior to as read. False to mark all as read. (Default: False)