Code Duplication    Length = 5-6 lines in 3 locations

main/inc/lib/AnnouncementManager.php 2 locations

@@ 361-365 (lines=5) @@
358
            $modify_icons .= "<a href=\"".api_get_self()."?".api_get_cidreq()."&action=showhide&id=".$id."&sec_token=".$stok."\">".
359
                Display::return_icon($image_visibility.'.png', $alt_visibility, '', ICON_SIZE_SMALL)."</a>";
360
361
            if (api_is_allowed_to_edit(false, true)) {
362
                $modify_icons .= "<a href=\"".api_get_self()."?".api_get_cidreq()."&action=delete&id=".$id."&sec_token=".$stok."\" onclick=\"javascript:if(!confirm('".addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES, $charset))."')) return false;\">".
363
                    Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).
364
                    "</a>";
365
            }
366
            $html .= "<tr><th style='text-align:right'>$modify_icons</th></tr>";
367
        }
368
@@ 1651-1655 (lines=5) @@
1648
                    } else {
1649
                        $modify_icons .= Display::return_icon('down_na.gif', get_lang('Down'));
1650
                    }
1651
                    if (api_is_allowed_to_edit(false, true)) {
1652
                        $modify_icons .= "<a href=\"".$actionUrl."&action=delete&id=".$myrow['id']."&sec_token=".$stok."\" onclick=\"javascript:if(!confirm('".addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES, api_get_system_encoding()))."')) return false;\">".
1653
                            Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).
1654
                            "</a>";
1655
                    }
1656
                    $iterator++;
1657
                } else {
1658
                    $modify_icons = Display::url(

main/survey/surveyUtil.class.php 1 location

@@ 2648-2653 (lines=6) @@
2645
        $return .= '<a href="'.api_get_path(WEB_CODE_PATH).'survey/reporting.php?'.api_get_cidreq().'&survey_id='.$survey_id.'">'.
2646
            Display::return_icon('stats.png', get_lang('Reporting'), '', ICON_SIZE_SMALL).'</a>';
2647
2648
        if (api_is_allowed_to_edit() ||
2649
            api_is_element_in_the_session(TOOL_SURVEY, $survey_id)
2650
        ) {
2651
            $return .= '<a href="'.api_get_path(WEB_CODE_PATH).'survey/survey_list.php?'.api_get_cidreq().'&action=delete&survey_id='.$survey_id.'" onclick="javascript: if(!confirm(\''.addslashes(api_htmlentities(get_lang("DeleteSurvey").'?', ENT_QUOTES)).'\')) return false;">'.
2652
                Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>&nbsp;';
2653
        }
2654
2655
        return $return;
2656
    }