@@ 214-222 (lines=9) @@ | ||
211 | * @param int $request_id |
|
212 | * @return int |
|
213 | */ |
|
214 | public function accept_request($request_id) |
|
215 | { |
|
216 | $this->db->set('confirmed', FRIEND_CONFIRMED) |
|
217 | ->where('user_id', (int)$request_id) |
|
218 | ->where('confirmed', FRIEND_NOT_CONFIRMED) |
|
219 | ->update('user_friend_link'); |
|
220 | ||
221 | return $this->db->affected_rows(); |
|
222 | } |
|
223 | ||
224 | // -------------------------------------------------------------------------- |
|
225 | ||
@@ 233-241 (lines=9) @@ | ||
230 | * @param int $request_id |
|
231 | * @return int |
|
232 | */ |
|
233 | public function reject_request($request_id) |
|
234 | { |
|
235 | $this->db->set('confirmed', FRIEND_REJECTED) |
|
236 | ->where('user_id', (int)$request_id) |
|
237 | ->where('confirmed', FRIEND_NOT_CONFIRMED) |
|
238 | ->update('user_friend_link'); |
|
239 | ||
240 | return $this->db->affected_rows(); |
|
241 | } |
|
242 | ||
243 | // -------------------------------------------------------------------------- |
|
244 |