From 30271517b872ba8c8c79f6e487b1876956f5f193 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Wed, 5 Jan 2011 09:55:15 +0000 Subject: [PATCH] Added feature that redirects a user to the custom block settings page after creating a custom block --- root/includes/acp/acp_portal.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/root/includes/acp/acp_portal.php b/root/includes/acp/acp_portal.php index f693fdb8..9069ffec 100644 --- a/root/includes/acp/acp_portal.php +++ b/root/includes/acp/acp_portal.php @@ -438,10 +438,17 @@ class acp_portal $sql = 'INSERT INTO ' . PORTAL_MODULES_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary); $db->sql_query($sql); - $c_class->install($db->sql_nextid()); + $module_id = $db->sql_nextid(); + + $c_class->install($module_id); $cache->purge(); // make sure we don't get errors after re-adding a module + if($module_classname == 'custom') + { + meta_refresh(3, append_sid("{$phpbb_admin_path}index.$phpEx", 'i=portal&mode=config&module_id=' . $module_id)); + } + trigger_error($user->lang['SUCCESS_ADD'] . adm_back_link($this->u_action)); }