1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 05:50:42 +02:00

[ticket/11994] Make install/enable just one UI thing

PHPBB3-11994
This commit is contained in:
Joas Schilling
2013-11-02 23:23:48 +01:00
parent 476464374a
commit 7e1a02b3a1
3 changed files with 9 additions and 18 deletions

View File

@@ -83,7 +83,6 @@ class acp_extensions
break;
case 'enable_pre':
case 'install_pre':
if (!$md_manager->validate_enable())
{
trigger_error($user->lang['EXTENSION_NOT_AVAILABLE'] . adm_back_link($this->u_action), E_USER_WARNING);
@@ -98,14 +97,12 @@ class acp_extensions
$template->assign_vars(array(
'PRE' => true,
'IS_ENABLING' => $action == 'enable_pre',
'L_CONFIRM_MESSAGE' => $this->user->lang('EXTENSION_' . (($action == 'enable_pre') ? 'ENABLE' : 'INSTALL') . '_CONFIRM', $md_manager->get_metadata('display-name')),
'U_ENABLE' => $this->u_action . '&action=' . (($action == 'enable_pre') ? 'enable' : 'install') . '&ext_name=' . urlencode($ext_name),
'L_CONFIRM_MESSAGE' => $this->user->lang('EXTENSION_ENABLE_CONFIRM', $md_manager->get_metadata('display-name')),
'U_ENABLE' => $this->u_action . '&action=enable&ext_name=' . urlencode($ext_name),
));
break;
case 'enable':
case 'install':
if (!$md_manager->validate_enable())
{
trigger_error($user->lang['EXTENSION_NOT_AVAILABLE'] . adm_back_link($this->u_action), E_USER_WARNING);
@@ -120,7 +117,7 @@ class acp_extensions
{
$template->assign_var('S_NEXT_STEP', true);
meta_refresh(0, $this->u_action . '&action=' . $action . '&ext_name=' . urlencode($ext_name));
meta_refresh(0, $this->u_action . '&action=enable&ext_name=' . urlencode($ext_name));
}
}
}
@@ -132,7 +129,6 @@ class acp_extensions
$this->tpl_name = 'acp_ext_enable';
$template->assign_vars(array(
'IS_ENABLING' => $action == 'enable',
'U_RETURN' => $this->u_action . '&action=list',
));
break;
@@ -309,7 +305,7 @@ class acp_extensions
));
$this->output_actions('disabled', array(
'INSTALL' => $this->u_action . '&action=install_pre&ext_name=' . urlencode($name),
'ENABLE' => $this->u_action . '&action=enable_pre&ext_name=' . urlencode($name),
));
}
catch(\phpbb\extension\exception $e)