phpBB

Code Changes

File: includes/acp/acp_extensions.php

  Unmodified   Added   Modified   Removed
Line 76Line 76
			{
$md_manager->get_metadata('all');
}

			{
$md_manager->get_metadata('all');
}

			catch(\phpbb\extension\exception $e)

			catch (\phpbb\extension\exception $e)

			{
trigger_error($e, E_USER_WARNING);
}

			{
trigger_error($e, E_USER_WARNING);
}

Line 120Line 120
					'FORCE_UNSTABLE'		=> $config['extension_force_unstable'],
'U_ACTION' => $this->u_action,
));

					'FORCE_UNSTABLE'		=> $config['extension_force_unstable'],
'U_ACTION' => $this->u_action,
));


add_form_key('version_check_settings');

 

$this->tpl_name = 'acp_ext_list';
break;


$this->tpl_name = 'acp_ext_list';
break;

Line 172Line 170
				if (!$extension->is_enableable())
{
trigger_error($user->lang['EXTENSION_NOT_ENABLEABLE'] . adm_back_link($this->u_action), E_USER_WARNING);

				if (!$extension->is_enableable())
{
trigger_error($user->lang['EXTENSION_NOT_ENABLEABLE'] . adm_back_link($this->u_action), E_USER_WARNING);

				}

if ($phpbb_extension_manager->is_enabled($ext_name))
{
redirect($this->u_action);

 
				}

try

				}

try

Line 357Line 350
				$enabled_extension_meta_data[$name]['S_VERSIONCHECK'] = true;
$enabled_extension_meta_data[$name]['U_VERSIONCHECK_FORCE'] = $this->u_action . '&action=details&versioncheck_force=1&ext_name=' . urlencode($md_manager->get_metadata('name'));
}

				$enabled_extension_meta_data[$name]['S_VERSIONCHECK'] = true;
$enabled_extension_meta_data[$name]['U_VERSIONCHECK_FORCE'] = $this->u_action . '&action=details&versioncheck_force=1&ext_name=' . urlencode($md_manager->get_metadata('name'));
}

			catch(\phpbb\extension\exception $e)

			catch (\phpbb\extension\exception $e)

			{
$this->template->assign_block_vars('disabled', array(
'META_DISPLAY_NAME' => $this->user->lang('EXTENSION_INVALID_LIST', $name, $e),

			{
$this->template->assign_block_vars('disabled', array(
'META_DISPLAY_NAME' => $this->user->lang('EXTENSION_INVALID_LIST', $name, $e),

Line 374Line 367

foreach ($enabled_extension_meta_data as $name => $block_vars)
{


foreach ($enabled_extension_meta_data as $name => $block_vars)
{

 
			$block_vars['NAME'] = $name;

			$block_vars['U_DETAILS'] = $this->u_action . '&action=details&ext_name=' . urlencode($name);

$this->template->assign_block_vars('enabled', $block_vars);

			$block_vars['U_DETAILS'] = $this->u_action . '&action=details&ext_name=' . urlencode($name);

$this->template->assign_block_vars('enabled', $block_vars);

Line 413Line 407
				$disabled_extension_meta_data[$name]['S_VERSIONCHECK'] = true;
$disabled_extension_meta_data[$name]['U_VERSIONCHECK_FORCE'] = $this->u_action . '&action=details&versioncheck_force=1&ext_name=' . urlencode($md_manager->get_metadata('name'));
}

				$disabled_extension_meta_data[$name]['S_VERSIONCHECK'] = true;
$disabled_extension_meta_data[$name]['U_VERSIONCHECK_FORCE'] = $this->u_action . '&action=details&versioncheck_force=1&ext_name=' . urlencode($md_manager->get_metadata('name'));
}

			catch(\phpbb\extension\exception $e)

			catch (\phpbb\extension\exception $e)

			{
$this->template->assign_block_vars('disabled', array(
'META_DISPLAY_NAME' => $this->user->lang('EXTENSION_INVALID_LIST', $name, $e),

			{
$this->template->assign_block_vars('disabled', array(
'META_DISPLAY_NAME' => $this->user->lang('EXTENSION_INVALID_LIST', $name, $e),

Line 430Line 424

foreach ($disabled_extension_meta_data as $name => $block_vars)
{


foreach ($disabled_extension_meta_data as $name => $block_vars)
{

 
			$block_vars['NAME'] = $name;

			$block_vars['U_DETAILS'] = $this->u_action . '&action=details&ext_name=' . urlencode($name);

$this->template->assign_block_vars('disabled', $block_vars);

			$block_vars['U_DETAILS'] = $this->u_action . '&action=details&ext_name=' . urlencode($name);

$this->template->assign_block_vars('disabled', $block_vars);

Line 472Line 467
				$available_extension_meta_data[$name]['S_VERSIONCHECK'] = true;
$available_extension_meta_data[$name]['U_VERSIONCHECK_FORCE'] = $this->u_action . '&action=details&versioncheck_force=1&ext_name=' . urlencode($md_manager->get_metadata('name'));
}

				$available_extension_meta_data[$name]['S_VERSIONCHECK'] = true;
$available_extension_meta_data[$name]['U_VERSIONCHECK_FORCE'] = $this->u_action . '&action=details&versioncheck_force=1&ext_name=' . urlencode($md_manager->get_metadata('name'));
}

			catch(\phpbb\extension\exception $e)

			catch (\phpbb\extension\exception $e)

			{
$this->template->assign_block_vars('disabled', array(
'META_DISPLAY_NAME' => $this->user->lang('EXTENSION_INVALID_LIST', $name, $e),

			{
$this->template->assign_block_vars('disabled', array(
'META_DISPLAY_NAME' => $this->user->lang('EXTENSION_INVALID_LIST', $name, $e),

Line 489Line 484

foreach ($available_extension_meta_data as $name => $block_vars)
{


foreach ($available_extension_meta_data as $name => $block_vars)
{

 
			$block_vars['NAME'] = $name;

			$block_vars['U_DETAILS'] = $this->u_action . '&action=details&ext_name=' . urlencode($name);

$this->template->assign_block_vars('disabled', $block_vars);

			$block_vars['U_DETAILS'] = $this->u_action . '&action=details&ext_name=' . urlencode($name);

$this->template->assign_block_vars('disabled', $block_vars);

Line 537Line 533

$version_check = $meta['extra']['version-check'];



$version_check = $meta['extra']['version-check'];


		$version_helper = new \phpbb\version_helper($this->cache, $this->config, $this->user);

		$version_helper = new \phpbb\version_helper($this->cache, $this->config, new \phpbb\file_downloader(), $this->user);

		$version_helper->set_current_version($meta['version']);

		$version_helper->set_current_version($meta['version']);

		$version_helper->set_file_location($version_check['host'], $version_check['directory'], $version_check['filename']);

		$version_helper->set_file_location($version_check['host'], $version_check['directory'], $version_check['filename'], isset($version_check['ssl']) ? $version_check['ssl'] : false);

		$version_helper->force_stability($this->config['extension_force_unstable'] ? 'unstable' : null);

return $updates = $version_helper->get_suggested_updates($force_update, $force_cache);

		$version_helper->force_stability($this->config['extension_force_unstable'] ? 'unstable' : null);

return $updates = $version_helper->get_suggested_updates($force_update, $force_cache);