Code Duplication    Length = 3-3 lines in 2 locations

class/class.newstopic.php 1 location

@@ 644-646 (lines=3) @@
641
        $result = $this->db->query($sql);
642
        $ret    = array();
643
        $myts   = MyTextSanitizer::getInstance();
644
        while ($myrow = $this->db->fetchArray($result)) {
645
            $ret[$myrow['topic_id']] = array(
646
                'title' => $myts->displayTarea($myrow['topic_title']),
647
                'pid'   => $myrow['topic_pid'],
648
                'color' => $myrow['topic_color']
649
            );

class/xoopstopic.php 1 location

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