Code Duplication    Length = 5-7 lines in 3 locations

main/forum/viewthread_nested.inc.php 2 locations

@@ 126-132 (lines=7) @@
123
        ($current_forum['allow_edit'] == 1 && $post['user_id'] == $userId) ||
124
        (api_is_allowed_to_edit(false, true) && !(api_is_course_coach() && $current_forum['session_id'] != $sessionId))
125
    ) {
126
        if ($locked == false) {
127
            $iconEdit .= "<a href=\"editpost.php?" . api_get_cidreq()
128
                . "&forum=$clean_forum_id&thread=$clean_thread_id&post={$post['post_id']}&id_attach=$id_attach"
129
                . "\">"
130
                . Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL)
131
                . "</a>";
132
        }
133
    }
134
135
    if (
@@ 167-171 (lines=5) @@
164
            )
165
        );
166
167
        if ($count > 0) {
168
            $iconEdit .= "<a href=\"viewthread.php?" . api_get_cidreq()
169
                . "&forum=$clean_forum_id&thread=$clean_thread_id&action=move&origin=$origin&post={$post['post_id']}"
170
                . "\">" . Display::return_icon('move.png', get_lang('MovePost'), array(), ICON_SIZE_SMALL) . "</a>";
171
        }
172
    }
173
174
    $userCanQualify = $currentThread['thread_peer_qualify'] == 1 && $post['poster_id'] != $userId;

main/admin/user_list.php 1 location

@@ 517-521 (lines=5) @@
514
    	$result .= Display::return_icon('login_as_na.png', get_lang('LoginAs')).'&nbsp;&nbsp;';
515
    }
516
517
	if ($current_user_status_label != $statusname[STUDENT]) {
518
		$result .= Display::return_icon('statistics_na.gif', get_lang('Reporting')).'&nbsp;&nbsp;';
519
	} else {
520
		$result .= '<a href="../mySpace/myStudents.php?student='.$user_id.'">'.Display::return_icon('statistics.gif', get_lang('Reporting')).'</a>&nbsp;&nbsp;';
521
	}
522
523
	if (api_is_platform_admin(true)) {
524
        $editProfileUrl = Display::getProfileEditionLink($user_id, true);