Code Duplication    Length = 8-8 lines in 2 locations

models/friends_model.php 2 locations

@@ 157-164 (lines=8) @@
154
        return $this->db->sql_nextid();
155
    }
156
157
    public function delete_friend_request($request_id)
158
    {
159
        $sql = "
160
			DELETE FROM " . $this->friends_request_table . " WHERE `request_id` = " . (int)$request_id . "
161
		";
162
163
        return $this->db->sql_query($sql);
164
    }
165
166
    public function approve_friend_request($request_id)
167
    {
@@ 166-173 (lines=8) @@
163
        return $this->db->sql_query($sql);
164
    }
165
166
    public function approve_friend_request($request_id)
167
    {
168
        $sql = "
169
			UPDATE " . $this->friends_request_table . " SET `status` = 1 WHERE `request_id` = " . (int)$request_id . "
170
		";
171
172
        return $this->db->sql_query($sql);
173
    }
174
175
    public function add_friend($data)
176
    {