Code Duplication    Length = 5-5 lines in 2 locations

modlink.php 1 location

@@ 106-110 (lines=5) @@
103
104
    $result = $xoopsDB->query('SELECT l.lid, l.cid, l.title, l.url, l.logourl, l.status, l.date, l.hits, l.rating, l.votes, l.comments, t.description FROM ' . $xoopsDB->prefix('mylinks_links') . ' l, ' . $xoopsDB->prefix('mylinks_text') . " t WHERE l.lid={$lid} AND l.lid=t.lid AND status>0");
105
    list($lid, $cid, $title, $url, $logourl, $status, $time, $hits, $rating, $votes, $comments, $description) = $xoopsDB->fetchRow($result);
106
    if ($xoopsUser && $xoopsUser->isAdmin($xoopsModule->mid())) {
107
        $adminlink = "<a href='" . XOOPSMYLINKURL . "/admin/index.php?op=modLink&amp;lid={$lid}'><img src='" . mylinksGetIconURL('edit.png') . "' style='border-width: 0px;' alt='" . _MD_MYLINKS_EDITTHISLINK . "'></a>";
108
    } else {
109
        $adminlink = '';
110
    }
111
    $votestring = (1 == $votes) ? _MD_MYLINKS_ONEVOTE : sprintf(_MD_MYLINKS_NUMVOTES, $votes);
112
113
    $xoopsTpl->assign('link', array('id'          => $lid,

singlelink.php 1 location

@@ 74-78 (lines=5) @@
71
72
$xoopsTpl->assign('anontellafriend', $GLOBALS['xoopsModuleConfig']['anontellafriend']);
73
74
if ($xoopsUser && $xoopsUser->isAdmin($xoopsModule->mid())) {
75
    $adminlink = "<a href='" . XOOPSMYLINKURL . "/admin/main.php?op=modLink&amp;lid={$lid}'><img src='" . mylinksGetIconURL('edit.png') . "' style='border-width: 0px;' alt='" . _MD_MYLINKS_EDITTHISLINK . "' title='" . _MD_MYLINKS_EDITTHISLINK . "'></a>";
76
} else {
77
    $adminlink = '';
78
}
79
$votestring = (1 == $votes) ? _MD_MYLINKS_ONEVOTE : sprintf(_MD_MYLINKS_NUMVOTES, $votes);
80
$new = newlinkgraphic($time, $status);
81
$pop = popgraphic($hits);