mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-12 10:35:20 +02:00
[ticket/11103] Purge notifications (to be used when an extension is purged)
PHPBB3-11103
This commit is contained in:
parent
25895bd5c3
commit
d0375c46f9
@ -733,6 +733,21 @@ class phpbb_notification_manager
|
||||
$this->db->sql_query($sql);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user