Code Duplication    Length = 13-15 lines in 2 locations

include/data.inc.php 1 location

@@ 43-57 (lines=15) @@
40
    $i   = 0;
41
    $ret = array();
42
43
    while ($row = $xoopsDB->fetchArray($result)) {
44
        $ret[$i]['link']     = "{$moduleURL}/singlelink.php?lid={$row['lid']}";
45
        $ret[$i]['cat_link'] = "{$moduleURL}/viewcat.php?cid={$row['cid']}";
46
        $ret[$i]['title']    = $row['ltitle'];
47
        $ret[$i]['time']     = $row['date'];
48
        //        $ret[$i]['description'] = $row['description'];
49
50
        // atom feed
51
        $ret[$i]['id']          = $row['lid'];
52
        $ret[$i]['description'] = $myts->displayTarea($row['description'], 0);    //no html
53
        $ret[$i]['cat_name']    = $row['ctitle'];   // category
54
        $ret[$i]['hits']        = $row['hits'];         // counter
55
        //        $ret[$i]['uid'] = $row['submitter'];   // show user name
56
        $i++;
57
    }
58
59
    return $ret;
60
}

include/feeddata.inc.php 1 location

@@ 32-44 (lines=13) @@
29
    $i   = 0;
30
    $ret = array();
31
32
    while ($row = $xoopsDB->fetchArray($result)) {
33
        $ret[$i]['link']     = "{$moduleURL}/singlelink.php?lid={$row['lid']}";
34
        $ret[$i]['cat_link'] = "{$moduleURL}/viewcat.php?cid={$row['cid']}";
35
        $ret[$i]['title']    = $row['ltitle'];    // link title
36
        $ret[$i]['time']     = $row['date'];       // date
37
        //        $ret[$i]['description'] = $row['description'];
38
        $ret[$i]['id']          = $row['lid'];          // atom feed
39
        $ret[$i]['description'] = $myts->displayTarea($row['description'], 0);    //no html
40
        $ret[$i]['cat_name']    = $row['ctitle']; // category
41
        $ret[$i]['hits']        = $row['hits'];       // counter
42
        //        $ret[$i]['uid'] = $row['submitter'];   // user name
43
        $i++;
44
    }
45
46
    return $ret;
47
}