-
Bug
-
Resolution: Fixed
-
Major
-
3.1.0-dev
-
None
Query in a two-dimensional loop. This already accounts for 1/2 of the queries on https://area51.phpbb.com/phpBB/ucp.php?i=ucp_notifications&mode=notification_options and scales poorly when new notification methods or types are added.
foreach ($this->get_subscription_types() as $group_name => $types)
|
{
|
foreach ($types as $id => $type)
|
{
|
$sql = 'SELECT method, notify
|
FROM ' . $this->user_notifications_table . '
|
WHERE user_id = ' . (int) $user_id . "
|
AND item_type = '" . $this->db->sql_escape($id) . "'
|
AND item_id = 0";
|
$result = $this->db->sql_query($sql);
|