aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/includes/notification/manager.php15
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