1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 05:50:42 +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:
Oliver Schramm
2015-05-28 17:31:21 +02:00
parent 4b3343e756
commit 185fbe41c9
15 changed files with 121 additions and 68 deletions

View File

@@ -886,6 +886,7 @@ function get_forum_parents(&$forum_data)
function get_moderators(&$forum_moderators, $forum_id = false)
{
global $config, $template, $db, $phpbb_root_path, $phpEx, $user, $auth;
global $phpbb_container;
$forum_id_ary = array();
@@ -921,6 +922,9 @@ function get_moderators(&$forum_moderators, $forum_id = false)
'WHERE' => 'm.display_on_index = 1',
);
/** @var \phpbb\group\helper $group_helper */
$group_helper = $phpbb_container->get('group_helper');
// We query every forum here because for caching we should not have any parameter.
$sql = $db->sql_build_query('SELECT', $sql_array);
$result = $db->sql_query($sql, 3600);
@@ -940,7 +944,7 @@ function get_moderators(&$forum_moderators, $forum_id = false)
}
else
{
$group_name = (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']);
$group_name = $group_helper->get_name($row['group_name']);
if ($user->data['user_id'] != ANONYMOUS && !$auth->acl_get('u_viewprofile'))
{