Code Duplication    Length = 3-3 lines in 2 locations

class/class.newstopic.php 1 location

@@ 608-610 (lines=3) @@
605
        $result = $this->db->query($sql);
606
        $ret    = array();
607
        $myts   = MyTextSanitizer::getInstance();
608
        while ($myrow = $this->db->fetchArray($result)) {
609
            $ret[$myrow['topic_id']] = array('title' => $myts->displayTarea($myrow['topic_title']), 'pid' => $myrow['topic_pid'], 'color' => $myrow['topic_color']);
610
        }
611
612
        return $ret;
613
    }

class/xoopstopic.php 1 location

@@ 385-387 (lines=3) @@
382
        $result = $this->db->query('SELECT topic_id, topic_pid, topic_title FROM ' . $this->table);
383
        $ret    = array();
384
        $myts   = MyTextSanitizer::getInstance();
385
        while ($myrow = $this->db->fetchArray($result)) {
386
            $ret[$myrow['topic_id']] = array('title' => $myts->htmlspecialchars($myrow['topic_title']), 'pid' => $myrow['topic_pid']);
387
        }
388
389
        return $ret;
390
    }