mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 05:18:52 +00:00
[ticket/10824] Resolve issues with displaying style and style info in ACP
PHPBB3-10824
This commit is contained in:
parent
068f621ed1
commit
10151ae642
1 changed files with 4 additions and 4 deletions
|
@ -975,7 +975,7 @@ class acp_styles
|
||||||
|
|
||||||
$style['_shown'] = true;
|
$style['_shown'] = true;
|
||||||
|
|
||||||
$style_cfg = $this->read_style_cfg($style['style_path']);
|
$style_cfg = $this->read_style_composer_file($style['style_path']);
|
||||||
|
|
||||||
// Generate template variables
|
// Generate template variables
|
||||||
$actions = array();
|
$actions = array();
|
||||||
|
@ -983,8 +983,8 @@ class acp_styles
|
||||||
// Style data
|
// Style data
|
||||||
'STYLE_ID' => $style['style_id'],
|
'STYLE_ID' => $style['style_id'],
|
||||||
'STYLE_NAME' => htmlspecialchars($style['style_name'], ENT_COMPAT),
|
'STYLE_NAME' => htmlspecialchars($style['style_name'], ENT_COMPAT),
|
||||||
'STYLE_VERSION' => $style_cfg['style_version'] ?? '-',
|
'STYLE_VERSION' => $style_cfg['version'] ?? '-',
|
||||||
'STYLE_PHPBB_VERSION' => $this->read_style_composer_file($style['style_path'])['extra']['phpbb-version'],
|
'STYLE_PHPBB_VERSION' => $style_cfg['extra']['phpbb-version'] ?? '',
|
||||||
'STYLE_PATH' => htmlspecialchars($style['style_path'], ENT_COMPAT),
|
'STYLE_PATH' => htmlspecialchars($style['style_path'], ENT_COMPAT),
|
||||||
'STYLE_COPYRIGHT' => strip_tags($style['style_copyright']),
|
'STYLE_COPYRIGHT' => strip_tags($style['style_copyright']),
|
||||||
'STYLE_ACTIVE' => $style['style_active'],
|
'STYLE_ACTIVE' => $style['style_active'],
|
||||||
|
@ -1196,7 +1196,7 @@ class acp_styles
|
||||||
protected function read_style_composer_file($dir)
|
protected function read_style_composer_file($dir)
|
||||||
{
|
{
|
||||||
// This should never happen, we give them a red warning because of its relevance.
|
// This should never happen, we give them a red warning because of its relevance.
|
||||||
if (!file_exists($this->styles_path . $dir . '/style.json'))
|
if (!file_exists($this->styles_path . $dir . '/composer.json'))
|
||||||
{
|
{
|
||||||
trigger_error($this->language->lang('NO_STYLE_CFG', $dir), E_USER_WARNING);
|
trigger_error($this->language->lang('NO_STYLE_CFG', $dir), E_USER_WARNING);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue