Code Duplication    Length = 12-12 lines in 2 locations

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 (0 != $topicid) {
50
            $this->getTopic((int)$topicid);
51
        } else {
52
            $this->topic_id = $topicid;
53
        }
54
    }
55
56
    /**
57
     * @param $value

class/class.newstopic.php 1 location

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