mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Merge pull request #4207 from marc1706/ticket/14132
[ticket/14132] Use transaction for adding notifications to type table
This commit is contained in:
commit
a0fa396901
1 changed files with 4 additions and 0 deletions
|
@ -923,6 +923,8 @@ class manager
|
||||||
{
|
{
|
||||||
$notification_type_ids = $this->cache->get('notification_type_ids');
|
$notification_type_ids = $this->cache->get('notification_type_ids');
|
||||||
|
|
||||||
|
$this->db->sql_transaction('begin');
|
||||||
|
|
||||||
if ($notification_type_ids === false)
|
if ($notification_type_ids === false)
|
||||||
{
|
{
|
||||||
$notification_type_ids = array();
|
$notification_type_ids = array();
|
||||||
|
@ -957,6 +959,8 @@ class manager
|
||||||
$this->cache->put('notification_type_ids', $notification_type_ids);
|
$this->cache->put('notification_type_ids', $notification_type_ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->db->sql_transaction('commit');
|
||||||
|
|
||||||
return $notification_type_ids[$notification_type_name];
|
return $notification_type_ids[$notification_type_name];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue