@@ 258-272 (lines=15) @@ | ||
255 | * METHOD: POST |
|
256 | * URL: /ajax/ignore_inline |
|
257 | */ |
|
258 | public function ignore() : void { |
|
259 | $this->form_validation->set_rules('id', 'Chapter ID', 'required|ctype_digit'); |
|
260 | $this->form_validation->set_rules('chapter', 'Chapter', 'required'); |
|
261 | ||
262 | if($this->form_validation->run() === TRUE) { |
|
263 | $success = $this->Tracker->list->ignoreByID($this->userID, $this->input->post('id'), $this->input->post('chapter')); |
|
264 | if($success) { |
|
265 | $this->output->set_status_header('200'); //Success! |
|
266 | } else { |
|
267 | $this->output->set_status_header('400', 'Unable to ignore?'); |
|
268 | } |
|
269 | } else { |
|
270 | $this->output->set_status_header('400', 'Missing/invalid parameters.'); |
|
271 | } |
|
272 | } |
|
273 | ||
274 | /** |
|
275 | * Used to set MAL ID |
|
@@ 29-43 (lines=15) @@ | ||
26 | * METHOD: POST |
|
27 | * URL: /ajax/update_inline |
|
28 | */ |
|
29 | public function update() : void { |
|
30 | $this->form_validation->set_rules('id', 'Chapter ID', 'required|ctype_digit'); |
|
31 | $this->form_validation->set_rules('chapter', 'Chapter', 'required'); |
|
32 | ||
33 | if($this->form_validation->run() === TRUE) { |
|
34 | $success = $this->Tracker->list->updateByID($this->userID, $this->input->post('id'), $this->input->post('chapter')); |
|
35 | if($success) { |
|
36 | $this->output->set_status_header('200'); //Success! |
|
37 | } else { |
|
38 | $this->output->set_status_header('400', 'Unable to update?'); |
|
39 | } |
|
40 | } else { |
|
41 | $this->output->set_status_header('400', 'Missing/invalid parameters.'); |
|
42 | } |
|
43 | } |
|
44 | ||
45 | /** |
|
46 | * Used locally to remove (multiple) series from a users' list. |