Code Duplication    Length = 12-12 lines in 2 locations

class/class.newstopic.php 1 location

@@ 48-59 (lines=12) @@
45
    /**
46
     * @param int $topicid
47
     */
48
    public function __construct($topicid = 0)
49
    {
50
        $this->db    = XoopsDatabaseFactory::getDatabaseConnection();
51
        $this->table = $this->db->prefix('news_topics');
52
        if (is_array($topicid)) {
53
            $this->makeTopic($topicid);
54
        } elseif ($topicid != 0) {
55
            $this->getTopic((int)$topicid);
56
        } else {
57
            $this->topic_id = $topicid;
58
        }
59
    }
60
61
    /**
62
     * @param int    $none

class/xoopstopic.php 1 location

@@ 43-54 (lines=12) @@
40
     * @param     $table
41
     * @param int $topicid
42
     */
43
    public function __construct($table, $topicid = 0)
44
    {
45
        $this->db    = XoopsDatabaseFactory::getDatabaseConnection();
46
        $this->table = $table;
47
        if (is_array($topicid)) {
48
            $this->makeTopic($topicid);
49
        } elseif ($topicid != 0) {
50
            $this->getTopic((int)$topicid);
51
        } else {
52
            $this->topic_id = $topicid;
53
        }
54
    }
55
56
    /**
57
     * @param $value