Code Duplication    Length = 7-7 lines in 2 locations

index.php 1 location

@@ 126-132 (lines=7) @@
123
$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')
124
                                   . ' t where l.status>0 and l.lid=t.lid ORDER BY date DESC', $xoopsModuleConfig['newlinks'], 0);
125
while (list($lid, $cid, $ltitle, $url, $logourl, $status, $time, $hits, $rating, $votes, $comments, $description) = $xoopsDB->fetchRow($result)) {
126
    if ($xoopsUser && $xoopsUser->isAdmin($xoopsModule->mid())) {
127
        $isadmin   = true;
128
        $adminlink = "<a href='" . XOOPSMYLINKURL . "/admin/main.php?op=modLink&amp;&fct=mylinks&amp;lid={$lid}'><img src='" . mylinksGetIconURL('edit.png') . "' style='border-width: 0px;' alt='" . _MD_MYLINKS_EDITTHISLINK . "'></a>";
129
    } else {
130
        $isadmin   = false;
131
        $adminlink = '';
132
    }
133
134
    $votestring = (1 == $votes) ? _MD_MYLINKS_ONEVOTE : sprintf(_MD_MYLINKS_NUMVOTES, $votes);
135
    $ltitle     = $myts->htmlSpecialChars($ltitle);

viewcat.php 1 location

@@ 220-226 (lines=7) @@
217
    $shotAttribution = '';
218
    $result          = $xoopsDB->query($sql, $show, $min);
219
    while (list($lid, $cid, $ltitle, $url, $logourl, $status, $time, $hits, $rating, $votes, $comments, $description) = $xoopsDB->fetchRow($result)) {
220
        if (!empty($xoopsUser) && $xoopsUser->isAdmin($xoopsModule->mid())) {
221
            $isadmin   = true;
222
            $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 . "'></a>";
223
        } else {
224
            $isadmin   = false;
225
            $adminlink = '';
226
        }
227
        $votestring = (1 == $votes) ? _MD_MYLINKS_ONEVOTE : sprintf(_MD_MYLINKS_NUMVOTES, $votes);
228
        $thisCatObj = $mylinksCatHandler->get($cid);
229
        $homePath   = "<a href='" . XOOPSMYLINKURL . "/index.php'>" . _MD_MYLINKS_MAIN . '</a>&nbsp;:&nbsp;';