mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-12 03:34:04 +02:00
[ticket/12143] Replace group name output
So now we can use translated group names for non-special groups PHPBB3-12143
This commit is contained in:
@@ -76,6 +76,9 @@ function compose_pm($id, $mode, $action, $user_folders = array())
|
||||
$error = array();
|
||||
$current_time = time();
|
||||
|
||||
/** @var \phpbb\group\helper $group_helper */
|
||||
$group_helper = $phpbb_container->get('group_helper');
|
||||
|
||||
// Was cancel pressed? If so then redirect to the appropriate page
|
||||
if ($cancel || ($current_time - $lastclick < 2 && $submit))
|
||||
{
|
||||
@@ -145,7 +148,7 @@ function compose_pm($id, $mode, $action, $user_folders = array())
|
||||
$group_options = '';
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$group_options .= '<option' . (($row['group_type'] == GROUP_SPECIAL) ? ' class="sep"' : '') . ' value="' . $row['group_id'] . '">' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</option>';
|
||||
$group_options .= '<option' . (($row['group_type'] == GROUP_SPECIAL) ? ' class="sep"' : '') . ' value="' . $row['group_id'] . '">' . $group_helper->get_name($row['group_name']) . '</option>';
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
@@ -1059,7 +1062,7 @@ function compose_pm($id, $mode, $action, $user_folders = array())
|
||||
{
|
||||
if ($type == 'g')
|
||||
{
|
||||
$row['name'] = ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['name']] : $row['name'];
|
||||
$row['name'] = $group_helper->get_name($row['name']);
|
||||
}
|
||||
|
||||
${$type}[$row['id']] = array('name' => $row['name'], 'colour' => $row['colour']);
|
||||
|
Reference in New Issue
Block a user