From d0b50b9ca11f014466ba6e8c0f427cc471b4e833 Mon Sep 17 00:00:00 2001 From: rubencm Date: Sat, 20 Apr 2019 21:53:10 +0000 Subject: [ticket/14459] Check language input for group PHPBB3-14459 --- phpBB/includes/acp/acp_attachments.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'phpBB') 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'], -- cgit v1.2.1 From caf5ee42fdf2c359c38d24641e5f16f417130628 Mon Sep 17 00:00:00 2001 From: rubencm Date: Thu, 20 Jun 2019 01:46:52 +0000 Subject: [ticket/14459] Fix rebase PHPBB3-14459 --- phpBB/includes/acp/acp_attachments.php | 1 - 1 file changed, 1 deletion(-) (limited to 'phpBB') diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php index feb1e405e4..94e36a26dc 100644 --- a/phpBB/includes/acp/acp_attachments.php +++ b/phpBB/includes/acp/acp_attachments.php @@ -1253,7 +1253,6 @@ class acp_attachments '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' => $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'] : '', -- cgit v1.2.1 From caa767e5a81fbb71e336ba077bfd8e7f6bfc6b5f Mon Sep 17 00:00:00 2001 From: rubencm Date: Fri, 21 Jun 2019 23:32:22 +0000 Subject: [ticket/14459] Fix template logic PHPBB3-14459 --- phpBB/adm/style/acp_attachments.html | 13 +++++++++++-- phpBB/includes/acp/acp_attachments.php | 7 ++----- 2 files changed, 13 insertions(+), 7 deletions(-) (limited to 'phpBB') diff --git a/phpBB/adm/style/acp_attachments.html b/phpBB/adm/style/acp_attachments.html index 868e256ef5..f92971bc93 100644 --- a/phpBB/adm/style/acp_attachments.html +++ b/phpBB/adm/style/acp_attachments.html @@ -424,8 +424,17 @@ - {L_EXTENSION_GROUP}{L_COLON} {attachments.EXT_GROUP_NAME}{L_NO_EXT_GROUP}
{attachments.L_DOWNLOAD_COUNT}
{L_IN} {L_PRIVATE_MESSAGE} - {attachments.REAL_FILENAME}
{attachments.COMMENT}
{attachments.L_DOWNLOAD_COUNT}
{L_TOPIC}{L_COLON} {attachments.TOPIC_TITLE} + {# File info of attachments in private messages is hidden #} + {attachments.REAL_FILENAME}
+ {L_EXTENSION_GROUP}{L_COLON} {attachments.EXT_GROUP_NAME}{L_NO_EXT_GROUP}
+ + {attachments.L_DOWNLOAD_COUNT}
+ + {L_IN} {L_PRIVATE_MESSAGE} + {attachments.COMMENT}
+ + {L_TOPIC}{L_COLON} {attachments.TOPIC_TITLE} + {attachments.FILETIME}
{L_POST_BY_AUTHOR} {attachments.ATTACHMENT_POSTER} {attachments.FILESIZE} diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php index 94e36a26dc..72cb639185 100644 --- a/phpBB/includes/acp/acp_attachments.php +++ b/phpBB/includes/acp/acp_attachments.php @@ -1244,16 +1244,13 @@ 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']); - $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']) : '', + 'REAL_FILENAME' => utf8_basename((string) $row['real_filename']), 'PHYSICAL_FILENAME' => utf8_basename((string) $row['physical_filename']), - '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'], + 'EXT_GROUP_NAME' => $this->lang->is_set('EXT_GROUP_' . $extensions[$row['extension']]['group_name']) ? $this->lang->lang('EXT_GROUP_' . $extensions[$row['extension']]['group_name']) : $extensions[$row['extension']]['group_name'], 'COMMENT' => $comment, 'TOPIC_TITLE' => (!$row['in_message']) ? (string) $row['topic_title'] : '', 'ATTACH_ID' => (int) $row['attach_id'], -- cgit v1.2.1 From 621747c7bc9b0105a96f6ea6e254fb6f51101c80 Mon Sep 17 00:00:00 2001 From: rubencm Date: Tue, 25 Jun 2019 15:57:44 +0000 Subject: [ticket/14459] Remove inline css PHPBB3-14459 --- phpBB/adm/style/acp_attachments.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB') diff --git a/phpBB/adm/style/acp_attachments.html b/phpBB/adm/style/acp_attachments.html index f92971bc93..9da12234ab 100644 --- a/phpBB/adm/style/acp_attachments.html +++ b/phpBB/adm/style/acp_attachments.html @@ -425,7 +425,7 @@ {# File info of attachments in private messages is hidden #} - {attachments.REAL_FILENAME}
+ {attachments.REAL_FILENAME}
{L_EXTENSION_GROUP}{L_COLON} {attachments.EXT_GROUP_NAME}{L_NO_EXT_GROUP}
{attachments.L_DOWNLOAD_COUNT}
-- cgit v1.2.1 From 6876fcb46a23159473b3ae2ac4cca4426a8b3728 Mon Sep 17 00:00:00 2001 From: rubencm Date: Tue, 25 Jun 2019 15:59:12 +0000 Subject: [ticket/14459] Remove unused variables PHPBB3-14459 --- phpBB/includes/acp/acp_attachments.php | 4 ---- 1 file changed, 4 deletions(-) (limited to 'phpBB') diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php index 72cb639185..48db954891 100644 --- a/phpBB/includes/acp/acp_attachments.php +++ b/phpBB/includes/acp/acp_attachments.php @@ -1249,14 +1249,10 @@ class acp_attachments 'FILESIZE' => get_formatted_filesize((int) $row['filesize']), 'FILETIME' => $user->format_date((int) $row['filetime']), 'REAL_FILENAME' => utf8_basename((string) $row['real_filename']), - 'PHYSICAL_FILENAME' => utf8_basename((string) $row['physical_filename']), 'EXT_GROUP_NAME' => $this->lang->is_set('EXT_GROUP_' . $extensions[$row['extension']]['group_name']) ? $this->lang->lang('EXT_GROUP_' . $extensions[$row['extension']]['group_name']) : $extensions[$row['extension']]['group_name'], 'COMMENT' => $comment, 'TOPIC_TITLE' => (!$row['in_message']) ? (string) $row['topic_title'] : '', 'ATTACH_ID' => (int) $row['attach_id'], - 'POST_ID' => (int) $row['post_msg_id'], - 'TOPIC_ID' => (int) $row['topic_id'], - 'POST_IDS' => (!empty($post_ids[$row['attach_id']])) ? (int) $post_ids[$row['attach_id']] : '', 'L_DOWNLOAD_COUNT' => $user->lang($l_downloaded_viewed, (int) $row['download_count']), -- cgit v1.2.1 From ef3b2a3f24016831aa86a39321a2b42c44e6c0e5 Mon Sep 17 00:00:00 2001 From: rubencm Date: Tue, 25 Jun 2019 16:20:00 +0000 Subject: [ticket/14459] Use twig PHPBB3-14459 --- phpBB/adm/style/acp_attachments.html | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) (limited to 'phpBB') diff --git a/phpBB/adm/style/acp_attachments.html b/phpBB/adm/style/acp_attachments.html index 9da12234ab..bc6380ff9d 100644 --- a/phpBB/adm/style/acp_attachments.html +++ b/phpBB/adm/style/acp_attachments.html @@ -421,26 +421,25 @@ - + {% for attachments in attachments %} - {# File info of attachments in private messages is hidden #} - {attachments.REAL_FILENAME}
- {L_EXTENSION_GROUP}{L_COLON} {attachments.EXT_GROUP_NAME}{L_NO_EXT_GROUP}
- - {attachments.L_DOWNLOAD_COUNT}
- - {L_IN} {L_PRIVATE_MESSAGE} - {attachments.COMMENT}
- - {L_TOPIC}{L_COLON} {attachments.TOPIC_TITLE} - + {{ lang('EXTENSION_GROUP') ~ lang('COLON') }} {% if attachments.EXT_GROUP_NAME %}{{ attachments.EXT_GROUP_NAME }}{% else %}{{ lang('NO_EXT_GROUP') }}{% endif %} + {% if attachments.S_IN_MESSAGE %} +
{{ attachments.L_DOWNLOAD_COUNT }} +
{{ lang('IN') }} {{ lang('PRIVATE_MESSAGE') }} + {% else %} +
{{ attachments.REAL_FILENAME }} + {% if attachments.COMMENT %}
{{ attachments.COMMENT }}{% endif %} +
{{ attachments.L_DOWNLOAD_COUNT }} +
{{ lang('TOPIC') ~ lang('COLON') }} {{ attachments.TOPIC_TITLE }} + {% endif %} - {attachments.FILETIME}
{L_POST_BY_AUTHOR} {attachments.ATTACHMENT_POSTER} - {attachments.FILESIZE} - + {{ attachments.FILETIME }}
{{ lang('POST_BY_AUTHOR') }} {{ attachments.ATTACHMENT_POSTER }} + {{ attachments.FILESIZE }} + - + {% endfor %} -- cgit v1.2.1 From 191008daff2ea6a2df3fc8fbcd5f8c99fbee89ce Mon Sep 17 00:00:00 2001 From: rubencm Date: Tue, 25 Jun 2019 16:23:59 +0000 Subject: [ticket/14459] Remove unused code PHPBB3-14459 --- phpBB/adm/style/acp_attachments.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB') diff --git a/phpBB/adm/style/acp_attachments.html b/phpBB/adm/style/acp_attachments.html index bc6380ff9d..6129d6a1a5 100644 --- a/phpBB/adm/style/acp_attachments.html +++ b/phpBB/adm/style/acp_attachments.html @@ -424,7 +424,7 @@ {% for attachments in attachments %} - {{ lang('EXTENSION_GROUP') ~ lang('COLON') }} {% if attachments.EXT_GROUP_NAME %}{{ attachments.EXT_GROUP_NAME }}{% else %}{{ lang('NO_EXT_GROUP') }}{% endif %} + {{ lang('EXTENSION_GROUP') ~ lang('COLON') }} {{ attachments.EXT_GROUP_NAME }} {% if attachments.S_IN_MESSAGE %}
{{ attachments.L_DOWNLOAD_COUNT }}
{{ lang('IN') }} {{ lang('PRIVATE_MESSAGE') }} -- cgit v1.2.1 From e0395fa2f2cd00624d5b3bde42961af3298ccf7f Mon Sep 17 00:00:00 2001 From: rubencm Date: Tue, 25 Jun 2019 16:29:51 +0000 Subject: [ticket/14459] Uppercase string to try to match language keys PHPBB3-14459 --- phpBB/includes/acp/acp_attachments.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'phpBB') diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php index 48db954891..93927544a8 100644 --- a/phpBB/includes/acp/acp_attachments.php +++ b/phpBB/includes/acp/acp_attachments.php @@ -132,7 +132,7 @@ class acp_attachments $s_assigned_groups = array(); while ($row = $db->sql_fetchrow($result)) { - $row['group_name'] = (isset($user->lang['EXT_GROUP_' . $row['group_name']])) ? $user->lang['EXT_GROUP_' . $row['group_name']] : $row['group_name']; + $row['group_name'] = (isset($user->lang['EXT_GROUP_' . utf8_strtoupper($row['group_name'])])) ? $user->lang['EXT_GROUP_' . utf8_strtoupper($row['group_name'])] : $row['group_name']; $s_assigned_groups[$row['cat_id']][] = $row['group_name']; } $db->sql_freeresult($result); @@ -577,7 +577,7 @@ class acp_attachments $group_id = $db->sql_nextid(); } - $group_name = (isset($user->lang['EXT_GROUP_' . $group_name])) ? $user->lang['EXT_GROUP_' . $group_name] : $group_name; + $group_name = (isset($user->lang['EXT_GROUP_' . utf8_strtoupper($group_name)])) ? $user->lang['EXT_GROUP_' . utf8_strtoupper($group_name)] : $group_name; $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_ATTACH_EXTGROUP_' . strtoupper($action), false, array($group_name)); } @@ -879,7 +879,7 @@ class acp_attachments 'U_EDIT' => $this->u_action . "&action=edit&g={$row['group_id']}", 'U_DELETE' => $this->u_action . "&action=delete&g={$row['group_id']}", - 'GROUP_NAME' => (isset($user->lang['EXT_GROUP_' . $row['group_name']])) ? $user->lang['EXT_GROUP_' . $row['group_name']] : $row['group_name'], + 'GROUP_NAME' => (isset($user->lang['EXT_GROUP_' . utf8_strtoupper($row['group_name'])])) ? $user->lang['EXT_GROUP_' . utf8_strtoupper($row['group_name'])] : $row['group_name'], 'CATEGORY' => $cat_lang[$row['cat_id']], ) ); @@ -1434,7 +1434,7 @@ class acp_attachments $group_name = array(); while ($row = $db->sql_fetchrow($result)) { - $row['group_name'] = (isset($user->lang['EXT_GROUP_' . $row['group_name']])) ? $user->lang['EXT_GROUP_' . $row['group_name']] : $row['group_name']; + $row['group_name'] = (isset($user->lang['EXT_GROUP_' . utf8_strtoupper($row['group_name'])])) ? $user->lang['EXT_GROUP_' . utf8_strtoupper($row['group_name'])] : $row['group_name']; $group_name[] = $row; } $db->sql_freeresult($result); -- cgit v1.2.1 From 0184865c5c1e6661efe7b2a4fa07980fe73bd007 Mon Sep 17 00:00:00 2001 From: rubencm Date: Tue, 25 Jun 2019 16:33:38 +0000 Subject: [ticket/14459] Uppercase string to try to match language keys PHPBB3-14459 --- phpBB/includes/acp/acp_attachments.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB') diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php index 93927544a8..a44ba61f07 100644 --- a/phpBB/includes/acp/acp_attachments.php +++ b/phpBB/includes/acp/acp_attachments.php @@ -440,7 +440,7 @@ class acp_attachments if ($row = $db->sql_fetchrow($result)) { $old_group_id = $row['group_id']; - do + donsions[$row['extens { $s_spacer = false; @@ -1249,7 +1249,7 @@ class acp_attachments 'FILESIZE' => get_formatted_filesize((int) $row['filesize']), 'FILETIME' => $user->format_date((int) $row['filetime']), 'REAL_FILENAME' => utf8_basename((string) $row['real_filename']), - 'EXT_GROUP_NAME' => $this->lang->is_set('EXT_GROUP_' . $extensions[$row['extension']]['group_name']) ? $this->lang->lang('EXT_GROUP_' . $extensions[$row['extension']]['group_name']) : $extensions[$row['extension']]['group_name'], + 'EXT_GROUP_NAME' => $this->lang->is_set('EXT_GROUP_' . utf8_strtoupper($extensions[$row['extension']]['group_name'])) ? $this->lang->lang('EXT_GROUP_' . utf8_strtoupper($extensions[$row['extension']]['group_name'])) : $extensions[$row['extension']]['group_name'], 'COMMENT' => $comment, 'TOPIC_TITLE' => (!$row['in_message']) ? (string) $row['topic_title'] : '', 'ATTACH_ID' => (int) $row['attach_id'], -- cgit v1.2.1 From 6787f6706ef54d35dd9d8450170823520f9a06c1 Mon Sep 17 00:00:00 2001 From: rubencm Date: Tue, 25 Jun 2019 16:37:16 +0000 Subject: [ticket/14459] Fix PHPBB3-14459 --- phpBB/includes/acp/acp_attachments.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB') diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php index a44ba61f07..421f3f3545 100644 --- a/phpBB/includes/acp/acp_attachments.php +++ b/phpBB/includes/acp/acp_attachments.php @@ -440,7 +440,7 @@ class acp_attachments if ($row = $db->sql_fetchrow($result)) { $old_group_id = $row['group_id']; - donsions[$row['extens + do { $s_spacer = false; -- cgit v1.2.1 From acb5794d5025b94ba6c696a343a3801acd5cd49e Mon Sep 17 00:00:00 2001 From: rubencm Date: Sat, 27 Jul 2019 15:15:58 +0000 Subject: [ticket/14459] Rename variable PHPBB3-14459 --- phpBB/includes/acp/acp_attachments.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'phpBB') diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php index 421f3f3545..bf6c3b1d1d 100644 --- a/phpBB/includes/acp/acp_attachments.php +++ b/phpBB/includes/acp/acp_attachments.php @@ -28,7 +28,7 @@ class acp_attachments protected $config; /** @var \phpbb\language\language */ - protected $lang; + protected $language; /** @var ContainerBuilder */ protected $phpbb_container; @@ -57,7 +57,7 @@ class acp_attachments $this->id = $id; $this->db = $db; $this->config = $config; - $this->lang = $phpbb_container->get('language'); + $this->language = $phpbb_container->get('language'); $this->template = $template; $this->user = $user; $this->phpbb_container = $phpbb_container; @@ -1249,7 +1249,7 @@ class acp_attachments 'FILESIZE' => get_formatted_filesize((int) $row['filesize']), 'FILETIME' => $user->format_date((int) $row['filetime']), 'REAL_FILENAME' => utf8_basename((string) $row['real_filename']), - 'EXT_GROUP_NAME' => $this->lang->is_set('EXT_GROUP_' . utf8_strtoupper($extensions[$row['extension']]['group_name'])) ? $this->lang->lang('EXT_GROUP_' . utf8_strtoupper($extensions[$row['extension']]['group_name'])) : $extensions[$row['extension']]['group_name'], + 'EXT_GROUP_NAME' => $this->language->is_set('EXT_GROUP_' . utf8_strtoupper($extensions[$row['extension']]['group_name'])) ? $this->language->lang('EXT_GROUP_' . utf8_strtoupper($extensions[$row['extension']]['group_name'])) : $extensions[$row['extension']]['group_name'], 'COMMENT' => $comment, 'TOPIC_TITLE' => (!$row['in_message']) ? (string) $row['topic_title'] : '', 'ATTACH_ID' => (int) $row['attach_id'], -- cgit v1.2.1 From c281604d0b80a9348f54895a22d6cff03c561c2a Mon Sep 17 00:00:00 2001 From: rubencm Date: Sat, 27 Jul 2019 23:52:01 +0000 Subject: [ticket/14459] Use language property PHPBB3-14459 --- phpBB/includes/acp/acp_attachments.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'phpBB') diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php index bf6c3b1d1d..94e3660de8 100644 --- a/phpBB/includes/acp/acp_attachments.php +++ b/phpBB/includes/acp/acp_attachments.php @@ -132,7 +132,7 @@ class acp_attachments $s_assigned_groups = array(); while ($row = $db->sql_fetchrow($result)) { - $row['group_name'] = (isset($user->lang['EXT_GROUP_' . utf8_strtoupper($row['group_name'])])) ? $user->lang['EXT_GROUP_' . utf8_strtoupper($row['group_name'])] : $row['group_name']; + $row['group_name'] = $this->language->is_set('EXT_GROUP_' . utf8_strtoupper($row['group_name'])) ? $this->language->lang('EXT_GROUP_' . utf8_strtoupper($row['group_name'])) : $row['group_name']; $s_assigned_groups[$row['cat_id']][] = $row['group_name']; } $db->sql_freeresult($result); @@ -577,7 +577,7 @@ class acp_attachments $group_id = $db->sql_nextid(); } - $group_name = (isset($user->lang['EXT_GROUP_' . utf8_strtoupper($group_name)])) ? $user->lang['EXT_GROUP_' . utf8_strtoupper($group_name)] : $group_name; + $group_name = $this->language->is_set('EXT_GROUP_' . utf8_strtoupper($group_name)) ? $this->language->lang('EXT_GROUP_' . utf8_strtoupper($group_name)) : $group_name; $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_ATTACH_EXTGROUP_' . strtoupper($action), false, array($group_name)); } @@ -879,7 +879,7 @@ class acp_attachments 'U_EDIT' => $this->u_action . "&action=edit&g={$row['group_id']}", 'U_DELETE' => $this->u_action . "&action=delete&g={$row['group_id']}", - 'GROUP_NAME' => (isset($user->lang['EXT_GROUP_' . utf8_strtoupper($row['group_name'])])) ? $user->lang['EXT_GROUP_' . utf8_strtoupper($row['group_name'])] : $row['group_name'], + 'GROUP_NAME' => $this->language->is_set('EXT_GROUP_' . utf8_strtoupper($row['group_name'])) ? $this->language->lang('EXT_GROUP_' . utf8_strtoupper($row['group_name'])) : $row['group_name'], 'CATEGORY' => $cat_lang[$row['cat_id']], ) ); @@ -1434,7 +1434,7 @@ class acp_attachments $group_name = array(); while ($row = $db->sql_fetchrow($result)) { - $row['group_name'] = (isset($user->lang['EXT_GROUP_' . utf8_strtoupper($row['group_name'])])) ? $user->lang['EXT_GROUP_' . utf8_strtoupper($row['group_name'])] : $row['group_name']; + $row['group_name'] = $this->language->is_set('EXT_GROUP_' . utf8_strtoupper($row['group_name'])) ? $this->language->lang('EXT_GROUP_' . utf8_strtoupper($row['group_name'])) : $row['group_name']; $group_name[] = $row; } $db->sql_freeresult($result); -- cgit v1.2.1