Code Duplication    Length = 7-7 lines in 2 locations

main/inc/lib/AnnouncementManager.php 2 locations

@@ 338-344 (lines=7) @@
335
        ) {
336
            $modify_icons = "<a href=\"" . api_get_self() . "?" . api_get_cidreq() . "&action=modify&id=" . $announcement_id . "\">" .
337
                Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL) . "</a>";
338
            if ($itemProperty->getVisibility() === 1) {
339
                $image_visibility = "visible";
340
                $alt_visibility = get_lang('Hide');
341
            } else {
342
                $image_visibility = "invisible";
343
                $alt_visibility = get_lang('Visible');
344
            }
345
            global $stok;
346
347
            $modify_icons .= "<a href=\"" . api_get_self() . "?" . api_get_cidreq() . "&action=showhide&id=" . $announcement_id . "&sec_token=" . $stok . "\">" .
@@ 1618-1624 (lines=7) @@
1615
                ) {
1616
                    $modify_icons = "<a href=\"".$actionUrl."&action=modify&id=".$myrow['id']."\">".
1617
                        Display::return_icon('edit.png', get_lang('Edit'),'',ICON_SIZE_SMALL)."</a>";
1618
                    if ($myrow['visibility']==1) {
1619
                        $image_visibility="visible";
1620
                        $alt_visibility=get_lang('Hide');
1621
                    } else {
1622
                        $image_visibility="invisible";
1623
                        $alt_visibility=get_lang('Visible');
1624
                    }
1625
                    $modify_icons .=  "<a href=\"".$actionUrl."&action=showhide&id=".$myrow['id']."&sec_token=".$stok."\">".
1626
                        Display::return_icon($image_visibility.'.png', $alt_visibility,'',ICON_SIZE_SMALL)."</a>";
1627