diff options
Diffstat (limited to 'phpBB/includes/notifications/service.php')
-rw-r--r-- | phpBB/includes/notifications/service.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/phpBB/includes/notifications/service.php b/phpBB/includes/notifications/service.php index 112cbae3fd..5dcfeb127b 100644 --- a/phpBB/includes/notifications/service.php +++ b/phpBB/includes/notifications/service.php @@ -210,6 +210,20 @@ class phpbb_notifications_service $this->db->sql_query($sql); } + public function add_subscription($item_type, $item_id, $method = '') + { + $this->get_item_type_class_name($item_type); + + $sql = 'INSERT INTO ' . USER_NOTIFICATIONS_TABLE . ' ' . + $this->db->sql_build_array('INSERT', array( + 'item_type' => $item_type, + 'item_id' => (int) $item_id, + 'user_id' => $this->phpbb_container->get('user')->data['user_id'], + 'method' => $method, + )); + $this->db->sql_query($sql); + } + /** * Load user helper * |