aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp
diff options
context:
space:
mode:
authorrubencm <rubencm@gmail.com>2019-04-20 21:53:10 +0000
committerrubencm <rubencm@gmail.com>2019-06-20 01:45:36 +0000
commitd0b50b9ca11f014466ba6e8c0f427cc471b4e833 (patch)
tree55a24327483ae115e22357468ee8274825a7c8c2 /phpBB/includes/acp
parentab6fd30d0dddc32d34c58ab63d35db2a755d19e9 (diff)
downloadforums-d0b50b9ca11f014466ba6e8c0f427cc471b4e833.tar
forums-d0b50b9ca11f014466ba6e8c0f427cc471b4e833.tar.gz
forums-d0b50b9ca11f014466ba6e8c0f427cc471b4e833.tar.bz2
forums-d0b50b9ca11f014466ba6e8c0f427cc471b4e833.tar.xz
forums-d0b50b9ca11f014466ba6e8c0f427cc471b4e833.zip
[ticket/14459] Check language input for group
PHPBB3-14459
Diffstat (limited to 'phpBB/includes/acp')
-rw-r--r--phpBB/includes/acp/acp_attachments.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php
index a7035f38b7..feb1e405e4 100644
--- a/phpBB/includes/acp/acp_attachments.php
+++ b/phpBB/includes/acp/acp_attachments.php
@@ -27,6 +27,9 @@ class acp_attachments
/** @var \phpbb\config\config */
protected $config;
+ /** @var \phpbb\language\language */
+ protected $lang;
+
/** @var ContainerBuilder */
protected $phpbb_container;
@@ -54,6 +57,7 @@ class acp_attachments
$this->id = $id;
$this->db = $db;
$this->config = $config;
+ $this->lang = $phpbb_container->get('language');
$this->template = $template;
$this->user = $user;
$this->phpbb_container = $phpbb_container;
@@ -1242,7 +1246,6 @@ class acp_attachments
// Capitalises the group name and checks if its key exists in the language file
$up_group_name = utf8_strtoupper($extensions[$row['extension']]['group_name']);
- $ext_group_name = (!empty($up_group_name)) ? (isset($user->lang['EXT_GROUP_' . $up_group_name]) ? $user->lang['EXT_GROUP_' . $up_group_name] : '') : '';
$template->assign_block_vars('attachments', array(
'ATTACHMENT_POSTER' => get_username_string('full', (int) $row['poster_id'], (string) $row['username'], (string) $row['user_colour'], (string) $row['username']),
@@ -1251,6 +1254,7 @@ class acp_attachments
'REAL_FILENAME' => (!$row['in_message']) ? utf8_basename((string) $row['real_filename']) : '',
'PHYSICAL_FILENAME' => utf8_basename((string) $row['physical_filename']),
'EXT_GROUP_NAME' => $ext_group_name,
+ 'EXT_GROUP_NAME' => $this->lang->is_set('EXT_GROUP_' . $up_group_name) ? $this->lang->lang('EXT_GROUP_' . $up_group_name) : $extensions[$row['extension']]['group_name'],
'COMMENT' => $comment,
'TOPIC_TITLE' => (!$row['in_message']) ? (string) $row['topic_title'] : '',
'ATTACH_ID' => (int) $row['attach_id'],