diff --git a/phpBB/adm/style/acp_ext_purge.html b/phpBB/adm/style/acp_ext_delete_data.html similarity index 81% rename from phpBB/adm/style/acp_ext_purge.html rename to phpBB/adm/style/acp_ext_delete_data.html index 310efd0e1d..bbac22055f 100644 --- a/phpBB/adm/style/acp_ext_purge.html +++ b/phpBB/adm/style/acp_ext_delete_data.html @@ -5,7 +5,7 @@

{L_EXTENSIONS_ADMIN}

{L_EXTENSIONS_EXPLAIN}

-

{L_EXTENSION_UNINSTALL_EXPLAIN}

+

{L_EXTENSION_DELETE_DATA_EXPLAIN}

@@ -20,18 +20,18 @@
- {L_EXTENSION_UNINSTALL} - + {L_EXTENSION_DELETE_DATA} +
-

{L_EXTENSION_UNINSTALL_IN_PROGRESS}

+

{L_EXTENSION_DELETE_DATA_IN_PROGRESS}

-

{L_EXTENSION_UNINSTALL_SUCCESS}

+

{L_EXTENSION_DELETE_DATA_SUCCESS}


{L_RETURN_TO_EXTENSION_LIST}

diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php index 7ca98221c0..29b29f7ad6 100644 --- a/phpBB/includes/acp/acp_extensions.php +++ b/phpBB/includes/acp/acp_extensions.php @@ -167,17 +167,21 @@ class acp_extensions )); break; - case 'purge_pre': - $this->tpl_name = 'acp_ext_purge'; + case 'delete_data_pre': + if ($phpbb_extension_manager->enabled($ext_name)) + { + redirect($this->u_action); + } + $this->tpl_name = 'acp_ext_delete_data'; $template->assign_vars(array( 'PRE' => true, - 'L_CONFIRM_MESSAGE' => $this->user->lang('EXTENSION_UNINSTALL_CONFIRM', $md_manager->get_metadata('display-name')), - 'U_PURGE' => $this->u_action . '&action=purge&ext_name=' . urlencode($ext_name), + 'L_CONFIRM_MESSAGE' => $this->user->lang('EXTENSION_DELETE_DATA_CONFIRM', $md_manager->get_metadata('display-name')), + 'U_PURGE' => $this->u_action . '&action=delete_data&ext_name=' . urlencode($ext_name), )); break; - case 'purge': + case 'delete_data': try { while ($phpbb_extension_manager->purge_step($ext_name)) @@ -187,7 +191,7 @@ class acp_extensions { $template->assign_var('S_NEXT_STEP', true); - meta_refresh(0, $this->u_action . '&action=purge&ext_name=' . urlencode($ext_name)); + meta_refresh(0, $this->u_action . '&action=delete_data&ext_name=' . urlencode($ext_name)); } } } @@ -196,7 +200,7 @@ class acp_extensions $template->assign_var('MIGRATOR_ERROR', $e->getLocalisedMessage($user)); } - $this->tpl_name = 'acp_ext_purge'; + $this->tpl_name = 'acp_ext_delete_data'; $template->assign_vars(array( 'U_RETURN' => $this->u_action . '&action=list', @@ -236,7 +240,6 @@ class acp_extensions $this->output_actions('enabled', array( 'DISABLE' => $this->u_action . '&action=disable_pre&ext_name=' . urlencode($name), - 'UNINSTALL' => $this->u_action . '&action=purge_pre&ext_name=' . urlencode($name), )); } catch(\phpbb\extension\exception $e) @@ -270,7 +273,7 @@ class acp_extensions $this->output_actions('disabled', array( 'ENABLE' => $this->u_action . '&action=enable_pre&ext_name=' . urlencode($name), - 'UNINSTALL' => $this->u_action . '&action=purge_pre&ext_name=' . urlencode($name), + 'DELETE_DATA' => $this->u_action . '&action=delete_data_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 5421789e68..7477324637 100644 --- a/phpBB/language/en/acp/extensions.php +++ b/phpBB/language/en/acp/extensions.php @@ -44,32 +44,32 @@ $lang = array_merge($lang, array( 'DETAILS' => 'Details', - 'EXTENSIONS_ENABLED' => 'Enabled Extensions', 'EXTENSIONS_DISABLED' => 'Disabled Extensions', + 'EXTENSIONS_ENABLED' => 'Enabled Extensions', + 'EXTENSION_DELETE_DATA' => 'Delete data', 'EXTENSION_DISABLE' => 'Disable', 'EXTENSION_ENABLE' => 'Enable', - 'EXTENSION_UNINSTALL' => 'Uninstall', + 'EXTENSION_DELETE_DATA_EXPLAIN' => 'Deleting data of an extension removes all of its data and settings. The extension files are retained so it can be enabled again.', '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_UNINSTALL_EXPLAIN' => 'Uninstalling an extension removes all of its data and settings. The extension files are retained so it can be installed again.', + 'EXTENSION_DELETE_DATA_IN_PROGRESS' => 'The data of the extension is currently being deleted, please do not leave or refresh this page until it is completed.', '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_UNINSTALL_IN_PROGRESS' => 'The extension is currently being uninstalled, please do not leave or refresh this page until it is completed.', + 'EXTENSION_DELETE_DATA_SUCCESS' => 'The data of the extension was deleted successfully', 'EXTENSION_DISABLE_SUCCESS' => 'The extension was disabled successfully', 'EXTENSION_ENABLE_SUCCESS' => 'The extension was enabled successfully', - 'EXTENSION_UNINSTALL_SUCCESS' => 'The extension was uninstalled successfully', 'EXTENSION_NAME' => 'Extension Name', 'EXTENSION_ACTIONS' => 'Actions', 'EXTENSION_OPTIONS' => 'Options', + 'EXTENSION_DELETE_DATA_CONFIRM' => 'Are you sure that you wish to delete all data of the “%s” extension? This cannot be undone!', '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_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',