diff --git a/phpBB/adm/style/acp_ext_list.html b/phpBB/adm/style/acp_ext_list.html index d77c7690f7..372d9e8599 100644 --- a/phpBB/adm/style/acp_ext_list.html +++ b/phpBB/adm/style/acp_ext_list.html @@ -6,6 +6,27 @@

{L_EXTENSIONS_EXPLAIN}

+
+ +
+ {L_EXTENSIONS_VERSION_CHECK_SETTINGS} +
+
+
+ + +
+
+ +

+   + + + {S_FORM_TOKEN} +

+
+
+ diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php index f1372ddb3e..88b6a9c270 100644 --- a/phpBB/includes/acp/acp_extensions.php +++ b/phpBB/includes/acp/acp_extensions.php @@ -85,13 +85,43 @@ class acp_extensions // What are we doing? switch ($action) { + case 'set_config_version_check_force_unstable': + $force_unstable = $this->request->variable('force_unstable', false); + + if ($force_unstable) + { + $s_hidden_fields = build_hidden_fields(array( + 'force_unstable' => $force_unstable, + )); + + confirm_box(false, $user->lang('EXTENSION_FORCE_UNSTABLE_CONFIRM'), $s_hidden_fields); + } + else + { + $config->set('extension_force_unstable', false); + trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($this->u_action)); + } + break; + case 'list': default: + if (confirm_box(true)) + { + $config->set('extension_force_unstable', true); + trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($this->u_action)); + } + $this->list_enabled_exts($phpbb_extension_manager); $this->list_disabled_exts($phpbb_extension_manager); $this->list_available_exts($phpbb_extension_manager); - $this->template->assign_var('U_VERSIONCHECK_FORCE', $this->u_action . '&action=list&versioncheck_force=1'); + $this->template->assign_vars(array( + 'U_VERSIONCHECK_FORCE' => $this->u_action . '&action=list&versioncheck_force=1', + 'FORCE_UNSTABLE' => $config['extension_force_unstable'], + 'U_ACTION' => $this->u_action, + )); + + add_form_key('version_check_settings'); $this->tpl_name = 'acp_ext_list'; break; diff --git a/phpBB/language/en/acp/extensions.php b/phpBB/language/en/acp/extensions.php index e151c041f3..4dc70fb951 100644 --- a/phpBB/language/en/acp/extensions.php +++ b/phpBB/language/en/acp/extensions.php @@ -84,6 +84,7 @@ $lang = array_merge($lang, array( 'EXTENSION_DELETE_DATA_CONFIRM' => 'Are you sure that you wish to delete the data associated with “%s”?

This removes all of its data and settings and 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_FORCE_UNSTABLE_CONFIRM' => 'Are you sure that you wish to force the use of unstable version?', 'RETURN_TO_EXTENSION_LIST' => 'Return to the extension list', @@ -113,5 +114,7 @@ $lang = array_merge($lang, array( 'DOWNLOAD_LATEST' => 'Download Version', 'NO_VERSIONCHECK' => 'No version check information given.', - 'VERSIONCHECK_FORCE_UPDATE_ALL' => 'Re-Check all', + 'VERSIONCHECK_FORCE_UPDATE_ALL' => 'Re-Check all', + 'FORCE_UNSTABLE' => 'Always check for unstable versions', + 'EXTENSIONS_VERSION_CHECK_SETTINGS' => 'Version check settings', )); diff --git a/phpBB/phpbb/db/migration/data/v310/extensions_version_check_force_unstable.php b/phpBB/phpbb/db/migration/data/v310/extensions_version_check_force_unstable.php new file mode 100644 index 0000000000..5941c3aa54 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/extensions_version_check_force_unstable.php @@ -0,0 +1,25 @@ +