mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
[feature/php-events] Replace core.acp_forums_add_forum_data
Add missing global $phpbb_dispatcher, add $action and name the event better PHPBB3-9550
This commit is contained in:
parent
2be60b80ae
commit
0f78b4699a
1 changed files with 4 additions and 4 deletions
|
@ -25,7 +25,7 @@ class acp_forums
|
||||||
|
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $db, $user, $auth, $template, $cache, $request;
|
global $db, $user, $auth, $template, $cache, $request, $phpbb_dispatcher;
|
||||||
global $config, $phpbb_admin_path, $phpbb_root_path, $phpEx;
|
global $config, $phpbb_admin_path, $phpbb_root_path, $phpEx;
|
||||||
|
|
||||||
$user->add_lang('acp/forums');
|
$user->add_lang('acp/forums');
|
||||||
|
@ -107,9 +107,6 @@ class acp_forums
|
||||||
'forum_id' => $forum_id
|
'forum_id' => $forum_id
|
||||||
);
|
);
|
||||||
|
|
||||||
$vars = array('forum_data');
|
|
||||||
extract($phpbb_dispatcher->trigger_event('core.acp_forums_add_forum_data', compact($vars)));
|
|
||||||
|
|
||||||
// No break here
|
// No break here
|
||||||
|
|
||||||
case 'add':
|
case 'add':
|
||||||
|
@ -153,6 +150,9 @@ class acp_forums
|
||||||
'forum_password_unset' => request_var('forum_password_unset', false),
|
'forum_password_unset' => request_var('forum_password_unset', false),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$vars = array('action', 'forum_data');
|
||||||
|
extract($phpbb_dispatcher->trigger_event('core.acp_forums_modify_forum_data', compact($vars)));
|
||||||
|
|
||||||
// On add, add empty forum_options... else do not consider it (not updating it)
|
// On add, add empty forum_options... else do not consider it (not updating it)
|
||||||
if ($action == 'add')
|
if ($action == 'add')
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue