Code Duplication    Length = 5-5 lines in 2 locations

blocks/blocks.php 2 locations

@@ 506-510 (lines=5) @@
503
504
    $related = false;
505
    $result  = $xoopsDB->query($sql, $limit, 0);
506
    while ($row = $xoopsDB->fetchArray($result)) {
507
        $row['pageurl']  = sprintf($wikiPage->getWikiLinkURL(), $row['keyword']);
508
        $row['pagelink'] = sprintf('<a href="%s" title="%s">%s</a>', $row['pageurl'], htmlspecialchars($row['title'], ENT_COMPAT), $row['title']);
509
        $related[]       = $row;
510
    }
511
    $xoopsDB->freeRecordSet($result);
512
513
    if ($related) {
@@ 607-611 (lines=5) @@
604
    } else {
605
        $result = $xoopsDB->query($sql);
606
    }
607
    while ($row = $xoopsDB->fetchArray($result)) {
608
        $row['pageurl']  = sprintf($wikiPage->getWikiLinkURL(), $row['keyword']);
609
        $row['pagelink'] = sprintf('<a href="%s" title="%s">%s</a>', $row['pageurl'], htmlspecialchars($row['title'], ENT_COMPAT), $row['title']);
610
        $linkshere[]     = $row;
611
    }
612
    $xoopsDB->freeRecordSet($result);
613
614
    if ($linkshere) {