Code Duplication    Length = 5-13 lines in 4 locations

main/social/profile_friends_and_groups.inc.php 1 location

@@ 80-92 (lines=13) @@
77
                $url_close = '</a>';
78
                $icon = '';
79
                $name = cut($result['name'], 20, true);
80
                if ($result['relation_type'] == GROUP_USER_PERMISSION_ADMIN) {
81
                    $icon = Display::return_icon(
82
                        'social_group_admin.png',
83
                        get_lang('Admin'),
84
                        array('style' => 'vertical-align:middle;width:16px;height:16px;')
85
                    );
86
                } elseif ($result['relation_type'] == GROUP_USER_PERMISSION_MODERATOR) {
87
                    $icon = Display::return_icon(
88
                        'social_group_moderator.png',
89
                        get_lang('Moderator'),
90
                        array('style' => 'vertical-align:middle;width:16px;height:16px;')
91
                    );
92
                }
93
                $count_users_group = count(
94
                    $userGroup->get_all_users_by_group($id)
95
                );

main/wiki/wiki.inc.php 2 locations

@@ 965-969 (lines=5) @@
962
963
        //assignment mode: identify page type
964
        $icon_assignment = null;
965
        if ($row['assignment'] == 1) {
966
            $icon_assignment = Display::return_icon(
967
                'wiki_assignment.png',
968
                get_lang('AssignmentDescExtra'),
969
                '',
970
                ICON_SIZE_SMALL
971
            );
972
        } elseif ($row['assignment'] == 2) {
@@ 3406-3410 (lines=5) @@
3403
3404
        //mode assignment: previous to show  page type
3405
        $icon_assignment = null;
3406
        if ($row['assignment'] == 1) {
3407
            $icon_assignment = Display::return_icon(
3408
                'wiki_assignment.png',
3409
                get_lang('AssignmentDescExtra'),
3410
                '',
3411
                ICON_SIZE_SMALL
3412
            );
3413
        } elseif ($row['assignment'] == 2) {

main/social/profile.php 1 location

@@ 460-472 (lines=13) @@
457
            $url_close = '</a>';
458
            $icon = '';
459
            $name = cut($result['name'], CUT_GROUP_NAME, true);
460
            if ($result['relation_type'] == GROUP_USER_PERMISSION_ADMIN) {
461
                $icon = Display::return_icon(
462
                    'social_group_admin.png',
463
                    get_lang('Admin'),
464
                    array('style'=>'vertical-align:middle;width:16px;height:16px;')
465
                );
466
            } elseif ($result['relation_type'] == GROUP_USER_PERMISSION_MODERATOR) {
467
                $icon = Display::return_icon(
468
                    'social_group_moderator.png',
469
                    get_lang('Moderator'),
470
                    array('style'=>'vertical-align:middle;width:16px;height:16px;')
471
                );
472
            }
473
            $count_users_group = count($userGroup->get_all_users_by_group($id));
474
            if ($count_users_group == 1) {
475
                $count_users_group = $count_users_group.' '.get_lang('Member');