diff options
author | Nathan Guse <nathaniel.guse@gmail.com> | 2012-12-15 18:25:26 -0600 |
---|---|---|
committer | Nathan Guse <nathaniel.guse@gmail.com> | 2012-12-15 18:25:26 -0600 |
commit | d0375c46f91eb88508cbd8e320c7eda78d4f01dd (patch) | |
tree | fe03b8cfacbe4e1cdcc17c25ab814879cbdc528c | |
parent | 25895bd5c3dc0749c8f7e5f7560752e936e66df7 (diff) | |
download | forums-d0375c46f91eb88508cbd8e320c7eda78d4f01dd.tar forums-d0375c46f91eb88508cbd8e320c7eda78d4f01dd.tar.gz forums-d0375c46f91eb88508cbd8e320c7eda78d4f01dd.tar.bz2 forums-d0375c46f91eb88508cbd8e320c7eda78d4f01dd.tar.xz forums-d0375c46f91eb88508cbd8e320c7eda78d4f01dd.zip |
[ticket/11103] Purge notifications (to be used when an extension is purged)
PHPBB3-11103
-rw-r--r-- | phpBB/includes/notification/manager.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/phpBB/includes/notification/manager.php b/phpBB/includes/notification/manager.php index 653446ab73..fee1d079aa 100644 --- a/phpBB/includes/notification/manager.php +++ b/phpBB/includes/notification/manager.php @@ -734,6 +734,21 @@ class phpbb_notification_manager } /** + * Purge all notifications of a certain type + * + * This should be called when an extension which has notification types + * is purged so that all those notifications are removed + * + * @param string $item_type + */ + public function purge_notifications($item_type) + { + $sql = 'DELETE FROM ' . $this->notifications_table . " + WHERE item_type = '" . $this->db->sql_escape($item_type) . "'"; + $this->db->sql_query($sql); + } + + /** * Enable all notifications of a certain type * * This should be called when an extension which has notification types |