Code Duplication    Length = 3-3 lines in 2 locations

class/xoopstopic.php 1 location

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

class/class.newstopic.php 1 location

@@ 649-651 (lines=3) @@
646
        $result = $this->db->query($sql);
647
        $ret    = [];
648
        $myts   = MyTextSanitizer::getInstance();
649
        while ($myrow = $this->db->fetchArray($result)) {
650
            $ret[$myrow['topic_id']] = [
651
                'title' => $myts->displayTarea($myrow['topic_title']),
652
                'pid'   => $myrow['topic_pid'],
653
                'color' => $myrow['topic_color']
654
            ];