diff options
author | Tristan Darricau <github@nicofuma.fr> | 2014-05-12 17:23:50 +0200 |
---|---|---|
committer | Tristan Darricau <github@nicofuma.fr> | 2014-05-28 22:19:03 +0200 |
commit | 8dc10d6971ede7fbc63fb3fd92512f95d9ec5dfb (patch) | |
tree | 93cd7a5f42e1a92f43d39c718bf32ee071399a65 /phpBB/includes | |
parent | f4d598559f28ef2f16b47d7e33d90305fd42173e (diff) | |
download | forums-8dc10d6971ede7fbc63fb3fd92512f95d9ec5dfb.tar forums-8dc10d6971ede7fbc63fb3fd92512f95d9ec5dfb.tar.gz forums-8dc10d6971ede7fbc63fb3fd92512f95d9ec5dfb.tar.bz2 forums-8dc10d6971ede7fbc63fb3fd92512f95d9ec5dfb.tar.xz forums-8dc10d6971ede7fbc63fb3fd92512f95d9ec5dfb.zip |
[ticket/11366] Add $config['extension_force_unstable']
PHPBB3-11366
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/acp/acp_extensions.php | 32 |
1 files changed, 31 insertions, 1 deletions
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; |