Code Duplication    Length = 5-5 lines in 2 locations

blocks/blocks.php 2 locations

@@ 498-502 (lines=5) @@
495
496
    $related = false;
497
    $result  = $xoopsDB->query($sql, $limit, 0);
498
    while ($row = $xoopsDB->fetchArray($result)) {
499
        $row['pageurl']  = sprintf($wikiPage->getWikiLinkURL(), $row['keyword']);
500
        $row['pagelink'] = sprintf('<a href="%s" title="%s">%s</a>', $row['pageurl'], htmlspecialchars($row['title'], ENT_COMPAT), $row['title']);
501
        $related[]       = $row;
502
    }
503
    $xoopsDB->freeRecordSet($result);
504
505
    if ($related) {
@@ 599-603 (lines=5) @@
596
    } else {
597
        $result = $xoopsDB->query($sql);
598
    }
599
    while ($row = $xoopsDB->fetchArray($result)) {
600
        $row['pageurl']  = sprintf($wikiPage->getWikiLinkURL(), $row['keyword']);
601
        $row['pagelink'] = sprintf('<a href="%s" title="%s">%s</a>', $row['pageurl'], htmlspecialchars($row['title'], ENT_COMPAT), $row['title']);
602
        $linkshere[]     = $row;
603
    }
604
    $xoopsDB->freeRecordSet($result);
605
606
    if ($linkshere) {