From b400790154e03adcc5f5274e2524330f238ea765 Mon Sep 17 00:00:00 2001 From: talonos Date: Thu, 18 Feb 2016 19:56:08 +0000 Subject: [PATCH] 1.0.0.rc1 update --- acp/acp_mchat_info.php | 19 ++++++++++--------- acp/acp_mchat_module.php | 34 ++++++++++++++-------------------- 2 files changed, 24 insertions(+), 29 deletions(-) diff --git a/acp/acp_mchat_info.php b/acp/acp_mchat_info.php index c50fff2..bffff83 100644 --- a/acp/acp_mchat_info.php +++ b/acp/acp_mchat_info.php @@ -1,11 +1,12 @@ 'ACP_CAT_MCHAT', 'modes' => array( 'configuration' => array( - 'title' => 'ACP_MCHAT_CONFIG', - 'auth' => 'ext_dmzx/mchat && acl_a_mchat', - 'cat' => array('ACP_CAT_MCHAT') + 'title' => 'ACP_MCHAT_CONFIG', + 'auth' => 'ext_dmzx/mchat && acl_a_mchat', + 'cat' => array('ACP_CAT_MCHAT'), ), ), ); diff --git a/acp/acp_mchat_module.php b/acp/acp_mchat_module.php index 4ca6bee..9a7b508 100644 --- a/acp/acp_mchat_module.php +++ b/acp/acp_mchat_module.php @@ -1,11 +1,12 @@ get('dmzx.mchat.admin.controller'); - - // Requests - $action = $request->variable('action', ''); - if ($request->is_set_post('add')) - { - $action = 'add'; - } + global $phpbb_container, $user; // Add the ACP lang file $user->add_lang_ext('dmzx/mchat', 'info_acp_mchat'); - // Load the display settings handle in the admin controller - $admin_controller->display_options(); - // Load a template from adm/style for our ACP page $this->tpl_name = 'acp_mchat'; // Set the page title for our ACP page $this->page_title = 'MCHAT_TITLE'; + // Get an instance of the admin controller + $admin_controller = $phpbb_container->get('dmzx.mchat.admin.controller'); + // Make the $u_action url available in the admin controller $admin_controller->set_page_url($this->u_action); + + // Load the display settings handle in the admin controller + $admin_controller->display_options(); } }