aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_admin.php
diff options
context:
space:
mode:
authorOliver Schramm <oliver.schramm97@gmail.com>2015-05-28 17:31:21 +0200
committerOliver Schramm <oliver.schramm97@gmail.com>2015-08-05 17:50:24 +0200
commit185fbe41c954640a0aa5632b541055005ef776c2 (patch)
tree9119922e5408dd9821d06a8f512f79d88fc6d73b /phpBB/includes/functions_admin.php
parent4b3343e756be45ac1ca26e976ba79e6353f41de3 (diff)
downloadforums-185fbe41c954640a0aa5632b541055005ef776c2.tar
forums-185fbe41c954640a0aa5632b541055005ef776c2.tar.gz
forums-185fbe41c954640a0aa5632b541055005ef776c2.tar.bz2
forums-185fbe41c954640a0aa5632b541055005ef776c2.tar.xz
forums-185fbe41c954640a0aa5632b541055005ef776c2.zip
[ticket/12143] Replace group name output
So now we can use translated group names for non-special groups PHPBB3-12143
Diffstat (limited to 'phpBB/includes/functions_admin.php')
-rw-r--r--phpBB/includes/functions_admin.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index 7ca1f621ff..cd8dcc2734 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -171,7 +171,10 @@ function size_select_options($size_compare)
*/
function group_select_options($group_id, $exclude_ids = false, $manage_founder = false)
{
- global $db, $user, $config;
+ global $db, $config, $phpbb_container;
+
+ /** @var \phpbb\group\helper $group_helper */
+ $group_helper = $phpbb_container->get('group_helper');
$exclude_sql = ($exclude_ids !== false && sizeof($exclude_ids)) ? 'WHERE ' . $db->sql_in_set('group_id', array_map('intval', $exclude_ids), true) : '';
$sql_and = (!$config['coppa_enable']) ? (($exclude_sql) ? ' AND ' : ' WHERE ') . "group_name <> 'REGISTERED_COPPA'" : '';
@@ -189,7 +192,7 @@ function group_select_options($group_id, $exclude_ids = false, $manage_founder =
while ($row = $db->sql_fetchrow($result))
{
$selected = ($row['group_id'] == $group_id) ? ' selected="selected"' : '';
- $s_group_options .= '<option' . (($row['group_type'] == GROUP_SPECIAL) ? ' class="sep"' : '') . ' value="' . $row['group_id'] . '"' . $selected . '>' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</option>';
+ $s_group_options .= '<option' . (($row['group_type'] == GROUP_SPECIAL) ? ' class="sep"' : '') . ' value="' . $row['group_id'] . '"' . $selected . '>' . $group_helper->get_name($row['group_name']) . '</option>';
}
$db->sql_freeresult($result);