Code Duplication    Length = 4-6 lines in 2 locations

main/forum/viewthread_flat.inc.php 1 location

@@ 169-174 (lines=6) @@
166
                )
167
            ) {
168
                if (api_is_allowed_to_session_edit(false, true)) {
169
                    if ($locked == false && postIsEditableByStudent($current_forum, $row)) {
170
                        $iconEdit .= "<a href=\"editpost.php?".api_get_cidreq()."&forum=".$clean_forum_id
171
                            . "&thread=".$clean_thread_id."&post=".$row['post_id']
172
                            . "&edit=edition&id_attach=".$id_attach."\">"
173
                            . Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL)."</a>";
174
                    }
175
                }
176
            }
177

main/work/work.lib.php 1 location

@@ 2199-2202 (lines=4) @@
2196
                if (api_is_allowed_to_edit()) {
2197
                    $action .= '<a href="'.$url.'view.php?'.api_get_cidreq().'&id='.$item_id.'" title="'.get_lang('View').'">'.$rateIcon.'</a> ';
2198
2199
                    if ($unoconv && empty($work['contains_file'])) {
2200
                        $action .= '<a href="'.$url.'work_list_all.php?'.api_get_cidreq().'&id='.$work_id.'&action=export_to_doc&item_id='.$item_id.'" title="'.get_lang('ExportToDoc').'" >'.
2201
                            Display::return_icon('export_doc.png', get_lang('ExportToDoc'), array(), ICON_SIZE_SMALL).'</a> ';
2202
                    }
2203
2204
                    $alreadyUploaded = '';
2205
                    if (!empty($work['url_correction'])) {