phpBB

Code Changes

File: includes/acp/acp_styles.php

  Unmodified   Added   Modified   Removed
Line 205Line 205
		{
if (in_array($dir, $this->reserved_style_names))
{

		{
if (in_array($dir, $this->reserved_style_names))
{

				$messages[] = $this->user->lang('STYLE_NAME_RESERVED', htmlspecialchars($dir));

				$messages[] = $this->user->lang('STYLE_NAME_RESERVED', htmlspecialchars($dir, ENT_COMPAT));

				continue;
}


				continue;
}


Line 225Line 225
					$found = true;
$installed_names[] = $style['style_name'];
$installed_dirs[] = $style['style_path'];

					$found = true;
$installed_names[] = $style['style_name'];
$installed_dirs[] = $style['style_path'];

					$messages[] = sprintf($this->user->lang['STYLE_INSTALLED'], htmlspecialchars($style['style_name']));

					$messages[] = sprintf($this->user->lang['STYLE_INSTALLED'], htmlspecialchars($style['style_name'], ENT_COMPAT));

				}
}
if (!$found)
{

				}
}
if (!$found)
{

				$messages[] = sprintf($this->user->lang['STYLE_NOT_INSTALLED'], htmlspecialchars($dir));

				$messages[] = sprintf($this->user->lang['STYLE_NOT_INSTALLED'], htmlspecialchars($dir, ENT_COMPAT));

			}
}


			}
}


Line 598Line 598
		{
$this->template->assign_block_vars('parent_styles', array(
'STYLE_ID' => $row['style_id'],

		{
$this->template->assign_block_vars('parent_styles', array(
'STYLE_ID' => $row['style_id'],

				'STYLE_NAME'	=> htmlspecialchars($row['style_name']),

				'STYLE_NAME'	=> htmlspecialchars($row['style_name'], ENT_COMPAT),

				'LEVEL'			=> $row['level'],
'SPACER' => str_repeat('  ', $row['level']),
)

				'LEVEL'			=> $row['level'],
'SPACER' => str_repeat('  ', $row['level']),
)

Line 609Line 609
		$this->template->assign_vars(array(
'S_STYLE_DETAILS' => true,
'STYLE_ID' => $style['style_id'],

		$this->template->assign_vars(array(
'S_STYLE_DETAILS' => true,
'STYLE_ID' => $style['style_id'],

			'STYLE_NAME'		=> htmlspecialchars($style['style_name']),
'STYLE_PATH' => htmlspecialchars($style['style_path']),
'STYLE_VERSION' => htmlspecialchars($style_cfg['style_version']),

			'STYLE_NAME'		=> htmlspecialchars($style['style_name'], ENT_COMPAT),
'STYLE_PATH' => htmlspecialchars($style['style_path'], ENT_COMPAT),
'STYLE_VERSION' => htmlspecialchars($style_cfg['style_version'], ENT_COMPAT),

			'STYLE_COPYRIGHT'	=> strip_tags($style['style_copyright']),
'STYLE_PARENT' => $style['style_parent_id'],
'S_STYLE_ACTIVE' => $style['style_active'],

			'STYLE_COPYRIGHT'	=> strip_tags($style['style_copyright']),
'STYLE_PARENT' => $style['style_parent_id'],
'S_STYLE_ACTIVE' => $style['style_active'],

Line 646Line 646

// Set up styles list variables
// Addons should increase this number and update template variable


// Set up styles list variables
// Addons should increase this number and update template variable

		$this->styles_list_cols = 4;

		$this->styles_list_cols = 5;

		$this->template->assign_var('STYLES_LIST_COLS', $this->styles_list_cols);

// Show styles list

		$this->template->assign_var('STYLES_LIST_COLS', $this->styles_list_cols);

// Show styles list

Line 657Line 657
		{
if (empty($style['_shown']))
{

		{
if (empty($style['_shown']))
{

				$style['_note'] = sprintf($this->user->lang['REQUIRES_STYLE'], htmlspecialchars($style['style_parent_tree']));

				$style['_note'] = sprintf($this->user->lang['REQUIRES_STYLE'], htmlspecialchars($style['style_parent_tree'], ENT_COMPAT));

				$this->list_style($style, 0);
}
}

				$this->list_style($style, 0);
}
}

Line 701Line 701

usort($styles, array($this, 'sort_styles'));



usort($styles, array($this, 'sort_styles'));


		$this->styles_list_cols = 3;

		$this->styles_list_cols = 4;

		$this->template->assign_vars(array(
'STYLES_LIST_COLS' => $this->styles_list_cols,
'STYLES_LIST_HIDE_COUNT' => true

		$this->template->assign_vars(array(
'STYLES_LIST_COLS' => $this->styles_list_cols,
'STYLES_LIST_HIDE_COUNT' => true

Line 826Line 826
				{
// Parent style is not installed yet
$style['_available'] = false;

				{
// Parent style is not installed yet
$style['_available'] = false;

					$style['_note'] = sprintf($this->user->lang['REQUIRES_STYLE'], htmlspecialchars($parent));

					$style['_note'] = sprintf($this->user->lang['REQUIRES_STYLE'], htmlspecialchars($parent, ENT_COMPAT));

				}
}


				}
}


Line 958Line 958
		}

$style['_shown'] = true;

		}

$style['_shown'] = true;

 

$style_cfg = $this->read_style_cfg($style['style_path']);


// Generate template variables
$actions = array();
$row = array(
// Style data


// Generate template variables
$actions = array();
$row = array(
// Style data

			'STYLE_ID'		=> $style['style_id'],
'STYLE_NAME' => htmlspecialchars($style['style_name']),
'STYLE_PHPBB_VERSION' => $this->read_style_cfg($style['style_path'])['phpbb_version'],
'STYLE_PATH' => htmlspecialchars($style['style_path']),
'STYLE_COPYRIGHT' => strip_tags($style['style_copyright']),
'STYLE_ACTIVE' => $style['style_active'],


			'STYLE_ID'				=> $style['style_id'],
'STYLE_NAME' => htmlspecialchars($style['style_name'], ENT_COMPAT),
'STYLE_VERSION' => $style_cfg['style_version'] ?? '-',
'STYLE_PHPBB_VERSION' => $style_cfg['phpbb_version'],
'STYLE_PATH' => htmlspecialchars($style['style_path'], ENT_COMPAT),
'STYLE_COPYRIGHT' => strip_tags($style['style_copyright']),
'STYLE_ACTIVE' => $style['style_active'],


// Additional data


// Additional data

			'DEFAULT'		=> ($style['style_id'] && $style['style_id'] == $this->default_style),
'USERS' => (isset($style['_users'])) ? $style['_users'] : '',
'LEVEL' => $level,
'PADDING' => (4 + 16 * $level),

			'DEFAULT'			=> ($style['style_id'] && $style['style_id'] == $this->default_style),
'USERS' => (isset($style['_users'])) ? $style['_users'] : '',
'LEVEL' => $level,
'PADDING' => (4 + 16 * $level),

			'SHOW_COPYRIGHT'	=> ($style['style_id']) ? false : true,

			'SHOW_COPYRIGHT'	=> ($style['style_id']) ? false : true,

			'STYLE_PATH_FULL'	=> htmlspecialchars($this->styles_path_absolute . '/' . $style['style_path']) . '/',

			'STYLE_PATH_FULL'	=> htmlspecialchars($this->styles_path_absolute . '/' . $style['style_path'], ENT_COMPAT) . '/',


// Comment to show below style
'COMMENT' => (isset($style['_note'])) ? $style['_note'] : '',


// Comment to show below style
'COMMENT' => (isset($style['_note'])) ? $style['_note'] : '',