Merge branch '3.3.x'

This commit is contained in:
Marc Alexander 2020-03-15 16:52:41 +01:00
commit 6951e970f3
No known key found for this signature in database
GPG key ID: 50E0D2423696F995
2 changed files with 17 additions and 12 deletions

View file

@ -96,6 +96,7 @@
<thead>
<tr>
<th>{L_STYLE_NAME}</th>
<th width="10%" style="white-space: nowrap; text-align: center;">{{ lang('STYLE_VERSION') }}</th>
<th width="10%" style="white-space: nowrap; text-align: center;">{L_STYLE_PHPBB_VERSION}</th>
<!-- IF not STYLES_LIST_HIDE_COUNT --><th width="10%" style="white-space: nowrap; text-align: center;">{L_STYLE_USED_BY}</th><!-- ENDIF -->
<th width="25%" style="white-space: nowrap; text-align: center;">{L_ACTIONS}</th>
@ -130,6 +131,7 @@
<span class="style-path"><br />{L_STYLE_PATH}{L_COLON} {styles_list.STYLE_PATH_FULL}</span>
<!-- ENDIF -->
</td>
<td class="{$ROW_CLASS} users">{{ styles_list.STYLE_VERSION }}</td>
<td class="{$ROW_CLASS} users">{styles_list.STYLE_PHPBB_VERSION}</td>
<!-- IF not STYLES_LIST_HIDE_COUNT -->
<td class="{$ROW_CLASS} users">{styles_list.USERS}</td>

View file

@ -646,7 +646,7 @@ class acp_styles
// 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
@ -701,7 +701,7 @@ class acp_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
@ -959,22 +959,25 @@ class acp_styles
$style['_shown'] = true;
$style_cfg = $this->read_style_cfg($style['style_path']);
// 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']),
'STYLE_VERSION' => $style_cfg['style_version'] ?? '-',
'STYLE_PHPBB_VERSION' => $style_cfg['phpbb_version'],
'STYLE_PATH' => htmlspecialchars($style['style_path']),
'STYLE_COPYRIGHT' => strip_tags($style['style_copyright']),
'STYLE_ACTIVE' => $style['style_active'],
// 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,
'STYLE_PATH_FULL' => htmlspecialchars($this->styles_path_absolute . '/' . $style['style_path']) . '/',