diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2013-11-02 23:23:48 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2013-11-08 01:19:59 +0100 |
commit | 7e1a02b3a192771043009078630e8e2b9b8026a1 (patch) | |
tree | c462fb1d7822e18ef9655c646616de6ece543b18 /phpBB | |
parent | 476464374a159ef90c28f2b58f8655fb706e0360 (diff) | |
download | forums-7e1a02b3a192771043009078630e8e2b9b8026a1.tar forums-7e1a02b3a192771043009078630e8e2b9b8026a1.tar.gz forums-7e1a02b3a192771043009078630e8e2b9b8026a1.tar.bz2 forums-7e1a02b3a192771043009078630e8e2b9b8026a1.tar.xz forums-7e1a02b3a192771043009078630e8e2b9b8026a1.zip |
[ticket/11994] Make install/enable just one UI thing
PHPBB3-11994
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/adm/style/acp_ext_enable.html | 10 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_extensions.php | 12 | ||||
-rw-r--r-- | phpBB/language/en/acp/extensions.php | 5 |
3 files changed, 9 insertions, 18 deletions
diff --git a/phpBB/adm/style/acp_ext_enable.html b/phpBB/adm/style/acp_ext_enable.html index 2a8c638b1d..670904a2ce 100644 --- a/phpBB/adm/style/acp_ext_enable.html +++ b/phpBB/adm/style/acp_ext_enable.html @@ -5,7 +5,7 @@ <h1>{L_EXTENSIONS_ADMIN}</h1> <p>{L_EXTENSIONS_EXPLAIN}</p> - <p><!-- IF IS_ENABLING -->{L_EXTENSION_ENABLE_EXPLAIN}<!-- ELSE -->{L_EXTENSION_INSTALL_EXPLAIN}<!-- ENDIF --></p> + <p>{L_EXTENSION_ENABLE_EXPLAIN}</p> <!-- IF MIGRATOR_ERROR --> <div class="errorbox"> @@ -20,18 +20,18 @@ <form id="acp_extensions" method="post" action="{U_ENABLE}"> <fieldset class="submit-buttons"> - <legend><!-- IF IS_ENABLING -->{L_EXTENSION_ENABLE}<!-- ELSE -->{L_EXTENSION_INSTALL}<!-- ENDIF --></legend> - <input class="button1" type="submit" name="enable" value="<!-- IF IS_ENABLING -->{L_EXTENSION_ENABLE}<!-- ELSE -->{L_EXTENSION_INSTALL}<!-- ENDIF -->" /> + <legend>{L_EXTENSION_ENABLE}</legend> + <input class="button1" type="submit" name="enable" value="{L_EXTENSION_ENABLE}" /> <input class="button2" type="submit" name="cancel" value="{L_CANCEL}" /> </fieldset> </form> <!-- ELSEIF S_NEXT_STEP --> <div class="errorbox"> - <p><!-- IF IS_ENABLING -->{L_EXTENSION_ENABLE_IN_PROGRESS}<!-- ELSE -->{L_EXTENSION_INSTALL_IN_PROGRESS}<!-- ENDIF --></p> + <p>{L_EXTENSION_ENABLE_IN_PROGRESS}</p> </div> <!-- ELSE --> <div class="successbox"> - <p><!-- IF IS_ENABLING -->{L_EXTENSION_ENABLE_SUCCESS}<!-- ELSE -->{L_EXTENSION_INSTALL_SUCCESS}<!-- ENDIF --></p> + <p>{L_EXTENSION_ENABLE_SUCCESS}</p> <br /> <p><a href="{U_RETURN}">{L_RETURN_TO_EXTENSION_LIST}</a></p> </div> diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php index da5a58c7d6..7ca98221c0 100644 --- a/phpBB/includes/acp/acp_extensions.php +++ b/phpBB/includes/acp/acp_extensions.php @@ -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) diff --git a/phpBB/language/en/acp/extensions.php b/phpBB/language/en/acp/extensions.php index 96eed14c0e..5421789e68 100644 --- a/phpBB/language/en/acp/extensions.php +++ b/phpBB/language/en/acp/extensions.php @@ -49,22 +49,18 @@ $lang = array_merge($lang, array( 'EXTENSION_DISABLE' => 'Disable', 'EXTENSION_ENABLE' => 'Enable', - 'EXTENSION_INSTALL' => 'Install', 'EXTENSION_UNINSTALL' => 'Uninstall', 'EXTENSION_DISABLE_EXPLAIN' => 'Disabling an extension retains its files, data and settings but removes any functionality added by the extension.', 'EXTENSION_ENABLE_EXPLAIN' => 'Enabling an extension allows you to use it on your board.', - 'EXTENSION_INSTALL_EXPLAIN' => 'Installing an extension will perform database changes that are required to use the extension on your board.', 'EXTENSION_UNINSTALL_EXPLAIN' => 'Uninstalling an extension removes all of its data and settings. The extension files are retained so it can be installed again.', 'EXTENSION_DISABLE_IN_PROGRESS' => 'The extension is currently being disabled, please do not leave or refresh this page until it is completed.', 'EXTENSION_ENABLE_IN_PROGRESS' => 'The extension is currently being enabled, please do not leave or refresh this page until it is completed.', - 'EXTENSION_INSTALL_IN_PROGRESS' => 'The extension is currently being installed, please do not leave or refresh this page until it is completed.', 'EXTENSION_UNINSTALL_IN_PROGRESS' => 'The extension is currently being uninstalled, please do not leave or refresh this page until it is completed.', 'EXTENSION_DISABLE_SUCCESS' => 'The extension was disabled successfully', 'EXTENSION_ENABLE_SUCCESS' => 'The extension was enabled successfully', - 'EXTENSION_INSTALL_SUCCESS' => 'The extension was installed successfully', 'EXTENSION_UNINSTALL_SUCCESS' => 'The extension was uninstalled successfully', 'EXTENSION_NAME' => 'Extension Name', @@ -73,7 +69,6 @@ $lang = array_merge($lang, array( 'EXTENSION_DISABLE_CONFIRM' => 'Are you sure that you wish to disable the “%s” extension?', 'EXTENSION_ENABLE_CONFIRM' => 'Are you sure that you wish to enable the “%s” extension?', - 'EXTENSION_INSTALL_CONFIRM' => 'Are you sure that you wish to install the “%s” extension?', 'EXTENSION_UNINSTALL_CONFIRM' => 'Are you sure that you wish to uninstall the “%s” extension? This will remove all data and settings stored for this extension and cannot be undone!', 'RETURN_TO_EXTENSION_LIST' => 'Return to the extension list', |