| @@ 8-15 (lines=8) @@ | ||
| 5 | parent::__construct(); |
|
| 6 | } |
|
| 7 | ||
| 8 | public function setByID(int $userID, int $chapterID, string $category) : bool { |
|
| 9 | $success = $this->db->set(['category' => $category, 'active' => 'Y', 'last_updated' => NULL]) |
|
| 10 | ->where('user_id', $userID) |
|
| 11 | ->where('id', $chapterID) |
|
| 12 | ->update('tracker_chapters'); |
|
| 13 | ||
| 14 | return (bool) $success; |
|
| 15 | } |
|
| 16 | ||
| 17 | public function setByIDList(array $idList, string $category) : array { |
|
| 18 | /* |
|
| @@ 205-215 (lines=11) @@ | ||
| 202 | return $success; |
|
| 203 | } |
|
| 204 | ||
| 205 | public function deleteByID(int $userID, int $chapterID) { |
|
| 206 | //Series are not fully deleted, they are just marked as inactive as to hide them from the user. |
|
| 207 | //This is to allow user history to function properly. |
|
| 208 | ||
| 209 | $success = $this->db->set(['active' => 'N', 'last_updated' => NULL]) |
|
| 210 | ->where('user_id', $userID) |
|
| 211 | ->where('id', $chapterID) |
|
| 212 | ->update('tracker_chapters'); |
|
| 213 | ||
| 214 | return (bool) $success; |
|
| 215 | } |
|
| 216 | public function deleteByIDList(array $idList) : array { |
|
| 217 | /* |
|
| 218 | * 0 = Success |
|