mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Merge pull request #3985 from prototech/ticket/13892
[ticket/13892] Respect "Someone reports a post" notification setting.
This commit is contained in:
commit
3a5336452c
8 changed files with 10 additions and 10 deletions
|
@ -82,7 +82,7 @@ class approve_post extends \phpbb\notification\type\post
|
||||||
$users[$post['poster_id']] = array('');
|
$users[$post['poster_id']] = array('');
|
||||||
|
|
||||||
return $this->get_authorised_recipients(array_keys($users), $post['forum_id'], array_merge($options, array(
|
return $this->get_authorised_recipients(array_keys($users), $post['forum_id'], array_merge($options, array(
|
||||||
'item_type' => self::$notification_option['id'],
|
'item_type' => static::$notification_option['id'],
|
||||||
)));
|
)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ class approve_topic extends \phpbb\notification\type\topic
|
||||||
$users[$post['poster_id']] = array('');
|
$users[$post['poster_id']] = array('');
|
||||||
|
|
||||||
return $this->get_authorised_recipients(array_keys($users), $post['forum_id'], array_merge($options, array(
|
return $this->get_authorised_recipients(array_keys($users), $post['forum_id'], array_merge($options, array(
|
||||||
'item_type' => self::$notification_option['id'],
|
'item_type' => static::$notification_option['id'],
|
||||||
)));
|
)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -95,7 +95,7 @@ class bookmark extends \phpbb\notification\type\post
|
||||||
$sql = 'SELECT n.*
|
$sql = 'SELECT n.*
|
||||||
FROM ' . $this->notifications_table . ' n, ' . $this->notification_types_table . ' nt
|
FROM ' . $this->notifications_table . ' n, ' . $this->notification_types_table . ' nt
|
||||||
WHERE n.notification_type_id = ' . (int) $this->notification_type_id . '
|
WHERE n.notification_type_id = ' . (int) $this->notification_type_id . '
|
||||||
AND n.item_parent_id = ' . (int) self::get_item_parent_id($post) . '
|
AND n.item_parent_id = ' . (int) static::get_item_parent_id($post) . '
|
||||||
AND n.notification_read = 0
|
AND n.notification_read = 0
|
||||||
AND nt.notification_type_id = n.notification_type_id
|
AND nt.notification_type_id = n.notification_type_id
|
||||||
AND nt.notification_type_enabled = 1';
|
AND nt.notification_type_enabled = 1';
|
||||||
|
|
|
@ -135,7 +135,7 @@ class post extends \phpbb\notification\type\base
|
||||||
$sql = 'SELECT n.*
|
$sql = 'SELECT n.*
|
||||||
FROM ' . $this->notifications_table . ' n, ' . $this->notification_types_table . ' nt
|
FROM ' . $this->notifications_table . ' n, ' . $this->notification_types_table . ' nt
|
||||||
WHERE n.notification_type_id = ' . (int) $this->notification_type_id . '
|
WHERE n.notification_type_id = ' . (int) $this->notification_type_id . '
|
||||||
AND n.item_parent_id = ' . (int) self::get_item_parent_id($post) . '
|
AND n.item_parent_id = ' . (int) static::get_item_parent_id($post) . '
|
||||||
AND n.notification_read = 0
|
AND n.notification_read = 0
|
||||||
AND nt.notification_type_id = n.notification_type_id
|
AND nt.notification_type_id = n.notification_type_id
|
||||||
AND nt.notification_type_enabled = 1';
|
AND nt.notification_type_enabled = 1';
|
||||||
|
|
|
@ -108,7 +108,7 @@ class post_in_queue extends \phpbb\notification\type\post
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->check_user_notification_options($auth_read[$post['forum_id']]['f_read'], array_merge($options, array(
|
return $this->check_user_notification_options($auth_read[$post['forum_id']]['f_read'], array_merge($options, array(
|
||||||
'item_type' => self::$notification_option['id'],
|
'item_type' => static::$notification_option['id'],
|
||||||
)));
|
)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,7 @@ class quote extends \phpbb\notification\type\post
|
||||||
), $options);
|
), $options);
|
||||||
|
|
||||||
$usernames = false;
|
$usernames = false;
|
||||||
preg_match_all(self::$regular_expression_match, $post['post_text'], $usernames);
|
preg_match_all(static::$regular_expression_match, $post['post_text'], $usernames);
|
||||||
|
|
||||||
if (empty($usernames[1]))
|
if (empty($usernames[1]))
|
||||||
{
|
{
|
||||||
|
@ -116,7 +116,7 @@ class quote extends \phpbb\notification\type\post
|
||||||
$sql = 'SELECT n.user_id
|
$sql = 'SELECT n.user_id
|
||||||
FROM ' . $this->notifications_table . ' n, ' . $this->notification_types_table . ' nt
|
FROM ' . $this->notifications_table . ' n, ' . $this->notification_types_table . ' nt
|
||||||
WHERE n.notification_type_id = ' . (int) $this->notification_type_id . '
|
WHERE n.notification_type_id = ' . (int) $this->notification_type_id . '
|
||||||
AND n.item_id = ' . self::get_item_id($post) . '
|
AND n.item_id = ' . static::get_item_id($post) . '
|
||||||
AND nt.notification_type_id = n.notification_type_id
|
AND nt.notification_type_id = n.notification_type_id
|
||||||
AND nt.notification_type_enabled = 1';
|
AND nt.notification_type_enabled = 1';
|
||||||
$result = $this->db->sql_query($sql);
|
$result = $this->db->sql_query($sql);
|
||||||
|
@ -147,7 +147,7 @@ class quote extends \phpbb\notification\type\post
|
||||||
{
|
{
|
||||||
$sql = 'DELETE FROM ' . $this->notifications_table . '
|
$sql = 'DELETE FROM ' . $this->notifications_table . '
|
||||||
WHERE notification_type_id = ' . (int) $this->notification_type_id . '
|
WHERE notification_type_id = ' . (int) $this->notification_type_id . '
|
||||||
AND item_id = ' . self::get_item_id($post) . '
|
AND item_id = ' . static::get_item_id($post) . '
|
||||||
AND ' . $this->db->sql_in_set('user_id', $remove_notifications);
|
AND ' . $this->db->sql_in_set('user_id', $remove_notifications);
|
||||||
$this->db->sql_query($sql);
|
$this->db->sql_query($sql);
|
||||||
}
|
}
|
||||||
|
|
|
@ -120,7 +120,7 @@ class report_pm extends \phpbb\notification\type\pm
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->check_user_notification_options($auth_approve[$post['forum_id']][$this->permission], array_merge($options, array(
|
return $this->check_user_notification_options($auth_approve[$post['forum_id']][$this->permission], array_merge($options, array(
|
||||||
'item_type' => self::$notification_option['id'],
|
'item_type' => static::$notification_option['id'],
|
||||||
)));
|
)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -108,7 +108,7 @@ class topic_in_queue extends \phpbb\notification\type\topic
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->check_user_notification_options($auth_read[$topic['forum_id']]['f_read'], array_merge($options, array(
|
return $this->check_user_notification_options($auth_read[$topic['forum_id']]['f_read'], array_merge($options, array(
|
||||||
'item_type' => self::$notification_option['id'],
|
'item_type' => static::$notification_option['id'],
|
||||||
)));
|
)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue