aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp
diff options
context:
space:
mode:
author3D-I <marktravai@gmail.com>2019-05-29 09:03:50 +0200
committer3D-I <marktravai@gmail.com>2019-05-29 09:03:55 +0200
commitfa1952fd08cc69dc633ad436ec4d4caffd11ca85 (patch)
treebe515b27741d1cd0d4b02a4492b8cf780625811c /phpBB/includes/acp
parent97e92f52d7b60ec7194bbee772ab14592c551e82 (diff)
downloadforums-fa1952fd08cc69dc633ad436ec4d4caffd11ca85.tar
forums-fa1952fd08cc69dc633ad436ec4d4caffd11ca85.tar.gz
forums-fa1952fd08cc69dc633ad436ec4d4caffd11ca85.tar.bz2
forums-fa1952fd08cc69dc633ad436ec4d4caffd11ca85.tar.xz
forums-fa1952fd08cc69dc633ad436ec4d4caffd11ca85.zip
[ticket/16071] Undefined index for custom attachments groups
PHPBB3-16071
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 5b1db5c31b..a7035f38b7 100644
--- a/phpBB/includes/acp/acp_attachments.php
+++ b/phpBB/includes/acp/acp_attachments.php
@@ -1240,13 +1240,17 @@ class acp_attachments
$display_cat = isset($extensions[$row['extension']]['display_cat']) ? $extensions[$row['extension']]['display_cat'] : ATTACHMENT_CATEGORY_NONE;
$l_downloaded_viewed = ($display_cat == ATTACHMENT_CATEGORY_NONE) ? 'DOWNLOAD_COUNTS' : 'VIEWED_COUNTS';
+ // 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']),
'FILESIZE' => get_formatted_filesize((int) $row['filesize']),
'FILETIME' => $user->format_date((int) $row['filetime']),
'REAL_FILENAME' => (!$row['in_message']) ? utf8_basename((string) $row['real_filename']) : '',
'PHYSICAL_FILENAME' => utf8_basename((string) $row['physical_filename']),
- 'EXT_GROUP_NAME' => (!empty($extensions[$row['extension']]['group_name'])) ? $user->lang['EXT_GROUP_' . $extensions[$row['extension']]['group_name']] : '',
+ 'EXT_GROUP_NAME' => $ext_group_name,
'COMMENT' => $comment,
'TOPIC_TITLE' => (!$row['in_message']) ? (string) $row['topic_title'] : '',
'ATTACH_ID' => (int) $row['attach_id'],