Code Duplication    Length = 6-6 lines in 2 locations

htdocs/themes/xbootstrap/modules/publisher/xoops_and_module_changes/modules/publisher/class/item.php 2 locations

@@ 1226-1231 (lines=6) @@
1223
            return $ret;
1224
        }
1225
        $theObjects = array();
1226
        while ($myrow = $this->db->fetchArray($result)) {
1227
            $item = new PublisherItem();
1228
            $item->assignVars($myrow);
1229
            $theObjects[$myrow['itemid']] = $item;
1230
            unset($item);
1231
        }
1232
        foreach ($theObjects as $theObject) {
1233
            if ($id_key === 'none') {
1234
                $ret[] = $theObject;
@@ 1731-1736 (lines=6) @@
1728
        $sql .= ' GROUP BY categoryid)mo';
1729
        $sql .= ' JOIN ' . $this->db->prefix('publisher_items') . ' mi ON mi.datesub = mo.date';
1730
        $result = $this->db->query($sql);
1731
        while ($row = $this->db->fetchArray($result)) {
1732
            $item = new PublisherItem();
1733
            $item->assignVars($row);
1734
            $ret[$row['categoryid']] = $item;
1735
            unset($item);
1736
        }
1737
1738
        return $ret;
1739
    }