mirror of
https://github.com/phpbb/phpbb.git
synced 2025-03-28 03:22:55 +01:00
[ticket/15590] Add events core.acp_bbcodes_(modify_create|delete)_after
PHPBB3-15590
This commit is contained in:
parent
17c3bf0b39
commit
02600626cc
@ -295,6 +295,22 @@ class acp_bbcodes
|
|||||||
|
|
||||||
$phpbb_log->add('admin', $user->data['user_id'], $user->ip, $log_action, false, array($data['bbcode_tag']));
|
$phpbb_log->add('admin', $user->data['user_id'], $user->ip, $log_action, false, array($data['bbcode_tag']));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Event after a BBCode has been added or updated
|
||||||
|
*
|
||||||
|
* @event core.acp_bbcodes_modify_create_after
|
||||||
|
* @var string action Type of the action: modify|create
|
||||||
|
* @var int bbcode_id The id of the added or updated bbcode
|
||||||
|
* @var array sql_ary Array with bbcode data (read only)
|
||||||
|
* @since 3.2.3-RC1
|
||||||
|
*/
|
||||||
|
$vars = array(
|
||||||
|
'action',
|
||||||
|
'bbcode_id',
|
||||||
|
'sql_ary',
|
||||||
|
);
|
||||||
|
extract($phpbb_dispatcher->trigger_event('core.acp_bbcodes_modify_create_after', compact($vars)));
|
||||||
|
|
||||||
trigger_error($user->lang[$lang] . adm_back_link($this->u_action));
|
trigger_error($user->lang[$lang] . adm_back_link($this->u_action));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -325,10 +341,28 @@ class acp_bbcodes
|
|||||||
{
|
{
|
||||||
if (confirm_box(true))
|
if (confirm_box(true))
|
||||||
{
|
{
|
||||||
|
$bbcode_tag = $row['bbcode_tag'];
|
||||||
|
|
||||||
$db->sql_query('DELETE FROM ' . BBCODES_TABLE . " WHERE bbcode_id = $bbcode_id");
|
$db->sql_query('DELETE FROM ' . BBCODES_TABLE . " WHERE bbcode_id = $bbcode_id");
|
||||||
$cache->destroy('sql', BBCODES_TABLE);
|
$cache->destroy('sql', BBCODES_TABLE);
|
||||||
$phpbb_container->get('text_formatter.cache')->invalidate();
|
$phpbb_container->get('text_formatter.cache')->invalidate();
|
||||||
$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_BBCODE_DELETE', false, array($row['bbcode_tag']));
|
$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_BBCODE_DELETE', false, array($bbcode_tag));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Event after a BBCode has been deleted
|
||||||
|
*
|
||||||
|
* @event core.acp_bbcodes_delete_after
|
||||||
|
* @var string action Type of the action: delete
|
||||||
|
* @var int bbcode_id The id of the deleted bbcode
|
||||||
|
* @var string bbcode_tag The tag of the deleted bbcode
|
||||||
|
* @since 3.2.3-RC1
|
||||||
|
*/
|
||||||
|
$vars = array(
|
||||||
|
'action',
|
||||||
|
'bbcode_id',
|
||||||
|
'bbcode_tag',
|
||||||
|
);
|
||||||
|
extract($phpbb_dispatcher->trigger_event('core.acp_bbcodes_delete_after', compact($vars)));
|
||||||
|
|
||||||
if ($request->is_ajax())
|
if ($request->is_ajax())
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user