mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/13422] Add new event core.ucp_save_custom_cookies
PHPBB3-13422
This commit is contained in:
parent
641a9e5441
commit
4700b44125
1 changed files with 16 additions and 0 deletions
|
@ -164,6 +164,22 @@ switch ($mode)
|
||||||
|
|
||||||
$cookie_name = str_replace($config['cookie_name'] . '_', '', $cookie_name);
|
$cookie_name = str_replace($config['cookie_name'] . '_', '', $cookie_name);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Event to save custom cookies from deletion
|
||||||
|
*
|
||||||
|
* @event core.ucp_save_custom_cookies
|
||||||
|
* @var string cookie_name Cookie name to checking
|
||||||
|
* @var bool continue Do we save our cookie or not
|
||||||
|
* @since 3.1.3-RC1
|
||||||
|
*/
|
||||||
|
$continue = false;
|
||||||
|
$vars = array('cookie_name', 'continue');
|
||||||
|
extract($phpbb_dispatcher->trigger_event('core.ucp_save_custom_cookies', compact($vars)));
|
||||||
|
if ($continue)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Polls are stored as {cookie_name}_poll_{topic_id}, cookie_name_ got removed, therefore checking for poll_
|
// Polls are stored as {cookie_name}_poll_{topic_id}, cookie_name_ got removed, therefore checking for poll_
|
||||||
if (strpos($cookie_name, 'poll_') !== 0)
|
if (strpos($cookie_name, 'poll_') !== 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue