1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-12 18:45:20 +02:00

[ticket/11103] Purge notifications (to be used when an extension is purged)

PHPBB3-11103
This commit is contained in:
Nathan Guse 2012-12-15 18:25:26 -06:00
parent 25895bd5c3
commit d0375c46f9

View File

@ -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
*