Code Duplication    Length = 7-7 lines in 4 locations

htdocs/class/xoopsblock.php 1 location

@@ 82-88 (lines=7) @@
79
     *
80
     * @param int $id
81
     */
82
    public function load($id)
83
    {
84
        $id  = (int)$id;
85
        $sql = 'SELECT * FROM ' . $this->db->prefix('newblocks') . ' WHERE bid = ' . $id;
86
        $arr = $this->db->fetchArray($this->db->query($sql));
87
        $this->assignVars($arr);
88
    }
89
90
    /**
91
     * Store Block Data to Database

htdocs/class/xoopscomments.php 1 location

@@ 80-86 (lines=7) @@
77
     *
78
     * @param int $id
79
     */
80
    public function load($id)
81
    {
82
        $id  = (int)$id;
83
        $sql = 'SELECT * FROM ' . $this->ctable . ' WHERE comment_id=' . $id;
84
        $arr = $this->db->fetchArray($this->db->query($sql));
85
        $this->assignVars($arr);
86
    }
87
88
    /**
89
     * Save Comment

htdocs/class/xoopsstory.php 1 location

@@ 271-277 (lines=7) @@
268
    /**
269
     * @param $storyid
270
     */
271
    public function getStory($storyid)
272
    {
273
        $storyid = (int)$storyid;
274
        $sql     = 'SELECT * FROM ' . $this->table . ' WHERE storyid=' . $storyid . '';
275
        $array   = $this->db->fetchArray($this->db->query($sql));
276
        $this->makeStory($array);
277
    }
278
279
    /**
280
     * @param $array

htdocs/class/xoopstopic.php 1 location

@@ 84-90 (lines=7) @@
81
    /**
82
     * @param $topicid
83
     */
84
    public function getTopic($topicid)
85
    {
86
        $topicid = (int)$topicid;
87
        $sql     = 'SELECT * FROM ' . $this->table . ' WHERE topic_id=' . $topicid . '';
88
        $array   = $this->db->fetchArray($this->db->query($sql));
89
        $this->makeTopic($array);
90
    }
91
92
    /**
93
     * @param $array