diff options
| author | Nathan Guse <nathaniel.guse@gmail.com> | 2012-09-15 14:33:15 -0500 |
|---|---|---|
| committer | Nathan Guse <nathaniel.guse@gmail.com> | 2012-09-15 14:33:15 -0500 |
| commit | 7454d5c2d526f237bf24825b80edf6c9f1750fc6 (patch) | |
| tree | 59ff36bf8d0ee581a1172a537ebb079dd058e3b1 /phpBB/includes/notifications/service.php | |
| parent | 05b573ebf76c737f89deaefd22ce963aa910e5d1 (diff) | |
| download | forums-7454d5c2d526f237bf24825b80edf6c9f1750fc6.tar forums-7454d5c2d526f237bf24825b80edf6c9f1750fc6.tar.gz forums-7454d5c2d526f237bf24825b80edf6c9f1750fc6.tar.bz2 forums-7454d5c2d526f237bf24825b80edf6c9f1750fc6.tar.xz forums-7454d5c2d526f237bf24825b80edf6c9f1750fc6.zip | |
[ticket/11103] Topic/Post in queue notification
Also, bug fixes and cleanup
PHPBB3-11103
Diffstat (limited to 'phpBB/includes/notifications/service.php')
| -rw-r--r-- | phpBB/includes/notifications/service.php | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/phpBB/includes/notifications/service.php b/phpBB/includes/notifications/service.php index 6e7b160e0f..777fa9a42f 100644 --- a/phpBB/includes/notifications/service.php +++ b/phpBB/includes/notifications/service.php @@ -262,7 +262,7 @@ class phpbb_notifications_service { foreach ($item_type as $type) { - $this->add_notifications($type, $data); + $this->add_notifications_for_users($type, $data, $notify_users); } return; @@ -353,7 +353,7 @@ class phpbb_notifications_service { foreach ($item_type as $type) { - $this->add_notifications($type, $data); + $this->update_notifications($type, $data); } return; @@ -386,12 +386,22 @@ class phpbb_notifications_service /** * Delete a notification * - * @param string $item_type Type identifier + * @param string|array $item_type Type identifier or array of item types (only acceptable if the $item_id is identical for the specified types) * @param int|array $item_id Identifier within the type (or array of ids) * @param array $data Data specific for this type that will be updated */ public function delete_notifications($item_type, $item_id) { + if (is_array($item_type)) + { + foreach ($item_type as $type) + { + $this->delete_notifications($type, $item_id); + } + + return; + } + $this->get_item_type_class_name($item_type); $sql = 'DELETE FROM ' . NOTIFICATIONS_TABLE . " @@ -400,6 +410,7 @@ 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); @@ -413,6 +424,7 @@ class phpbb_notifications_service )); $this->db->sql_query($sql); } +*/ /** * Load user helper |
