@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare(strict_types=1); defined('BASEPATH') OR exit('No direct script access allowed'); |
|
| 1 | +<?php declare(strict_types=1); defined('BASEPATH') or exit('No direct script access allowed'); |
|
| 2 | 2 | |
| 3 | 3 | class Tracker_Admin_Model extends Tracker_Base_Model { |
| 4 | 4 | public function __construct() { |
@@ -1,4 +1,4 @@ discard block |
||
| 1 | -<?php declare(strict_types=1); defined('BASEPATH') OR exit('No direct script access allowed'); |
|
| 1 | +<?php declare(strict_types = 1); defined('BASEPATH') OR exit('No direct script access allowed'); |
|
| 2 | 2 | |
| 3 | 3 | class Tracker_Admin_Model extends Tracker_Base_Model { |
| 4 | 4 | public function __construct() { |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | // @formatter:on |
| 65 | 65 | |
| 66 | 66 | if($query->num_rows() > 0) { |
| 67 | - foreach ($query->result() as $row) { |
|
| 67 | + foreach($query->result() as $row) { |
|
| 68 | 68 | print "> {$row->title} <{$row->site_class}> | <{$row->title_id}>"; //Print this prior to doing anything so we can more easily find out if something went wrong |
| 69 | 69 | $titleData = $this->sites->{$row->site_class}->getTitleData($row->title_url); |
| 70 | 70 | if(is_array($titleData) && !is_null($titleData['latest_chapter'])) { |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | $query = $query->get(); |
| 143 | 143 | |
| 144 | 144 | if($query->num_rows() > 0) { |
| 145 | - foreach ($query->result() as $row) { |
|
| 145 | + foreach($query->result() as $row) { |
|
| 146 | 146 | print "> {$row->title} <{$row->site_class}> | <{$row->title_id}>"; //Print this prior to doing anything so we can more easily find out if something went wrong |
| 147 | 147 | $titleData = $this->sites->{$row->site_class}->getTitleData($row->title_url); |
| 148 | 148 | if(is_array($titleData) && !is_null($titleData['latest_chapter'])) { |
@@ -183,10 +183,10 @@ discard block |
||
| 183 | 183 | ->get(); |
| 184 | 184 | |
| 185 | 185 | $sites = $query->result_array(); |
| 186 | - foreach ($sites as $site) { |
|
| 186 | + foreach($sites as $site) { |
|
| 187 | 187 | $siteClass = $this->sites->{$site['site_class']}; |
| 188 | 188 | if($titleDataList = $siteClass->doCustomUpdate()) { |
| 189 | - foreach ($titleDataList as $titleURL => $titleData) { |
|
| 189 | + foreach($titleDataList as $titleURL => $titleData) { |
|
| 190 | 190 | print "> {$titleData['title']} <{$site['site_class']}>"; //Print this prior to doing anything so we can more easily find out if something went wrong |
| 191 | 191 | if(is_array($titleData) && !is_null($titleData['latest_chapter'])) { |
| 192 | 192 | if($dbTitleData = $this->Tracker->title->getID($titleURL, (int) $site['id'], FALSE, TRUE)) { |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | $query = $this->db->select('tracker_titles.id, tracker_titles.title_url, tracker_sites.site_class') |
| 227 | 227 | ->from('tracker_titles') |
| 228 | 228 | ->join('tracker_sites', 'tracker_sites.id = tracker_titles.site_id', 'left') |
| 229 | - ->where('tracker_titles.followed','N') |
|
| 229 | + ->where('tracker_titles.followed', 'N') |
|
| 230 | 230 | ->where('tracker_titles !=', '255') |
| 231 | 231 | ->where('tracker_sites.status', 'enabled') |
| 232 | 232 | ->where('tracker_sites.use_custom', 'Y') |
@@ -284,7 +284,7 @@ discard block |
||
| 284 | 284 | // @formatter:on |
| 285 | 285 | |
| 286 | 286 | if($query->num_rows() > 0) { |
| 287 | - foreach ($query->result() as $row) { |
|
| 287 | + foreach($query->result() as $row) { |
|
| 288 | 288 | print "> {$row->title} <{$row->site_class}>"; //Print this prior to doing anything so we can more easily find out if something went wrong |
| 289 | 289 | $titleData = $this->sites->{$row->site_class}->getTitleData($row->title_url); |
| 290 | 290 | if($titleData['title'] && is_array($titleData) && !is_null($titleData['latest_chapter'])) { |
@@ -74,8 +74,8 @@ discard block |
||
| 74 | 74 | //Make sure last_checked is always updated on successful run. |
| 75 | 75 | //CHECK: Is there a reason we aren't just doing this in updateByID? |
| 76 | 76 | $this->db->set('last_checked', 'CURRENT_TIMESTAMP', FALSE) |
| 77 | - ->where('id', $row->title_id) |
|
| 78 | - ->update('tracker_titles'); |
|
| 77 | + ->where('id', $row->title_id) |
|
| 78 | + ->update('tracker_titles'); |
|
| 79 | 79 | |
| 80 | 80 | print " - ({$titleData['latest_chapter']})\n"; |
| 81 | 81 | } else { |
@@ -152,8 +152,8 @@ discard block |
||
| 152 | 152 | //Make sure last_checked is always updated on successful run. |
| 153 | 153 | //CHECK: Is there a reason we aren't just doing this in updateByID? |
| 154 | 154 | $this->db->set('last_checked', 'CURRENT_TIMESTAMP', FALSE) |
| 155 | - ->where('id', $row->title_id) |
|
| 156 | - ->update('tracker_titles'); |
|
| 155 | + ->where('id', $row->title_id) |
|
| 156 | + ->update('tracker_titles'); |
|
| 157 | 157 | |
| 158 | 158 | print " - ({$titleData['latest_chapter']})\n"; |
| 159 | 159 | } else { |
@@ -177,10 +177,10 @@ discard block |
||
| 177 | 177 | */ |
| 178 | 178 | public function updateCustom() { |
| 179 | 179 | $query = $this->db->select('*') |
| 180 | - ->from('tracker_sites') |
|
| 181 | - ->where('status', 'enabled') |
|
| 182 | - ->where('tracker_sites.use_custom', 'Y') |
|
| 183 | - ->get(); |
|
| 180 | + ->from('tracker_sites') |
|
| 181 | + ->where('status', 'enabled') |
|
| 182 | + ->where('tracker_sites.use_custom', 'Y') |
|
| 183 | + ->get(); |
|
| 184 | 184 | |
| 185 | 185 | $sites = $query->result_array(); |
| 186 | 186 | foreach ($sites as $site) { |
@@ -196,8 +196,8 @@ discard block |
||
| 196 | 196 | //Make sure last_checked is always updated on successful run. |
| 197 | 197 | //CHECK: Is there a reason we aren't just doing this in updateByID? |
| 198 | 198 | $this->db->set('last_checked', 'CURRENT_TIMESTAMP', FALSE) |
| 199 | - ->where('id', $titleID) |
|
| 200 | - ->update('tracker_titles'); |
|
| 199 | + ->where('id', $titleID) |
|
| 200 | + ->update('tracker_titles'); |
|
| 201 | 201 | |
| 202 | 202 | print " - ({$titleData['latest_chapter']})\n"; |
| 203 | 203 | } else { |
@@ -224,13 +224,13 @@ discard block |
||
| 224 | 224 | |
| 225 | 225 | public function refollowCustom() { |
| 226 | 226 | $query = $this->db->select('tracker_titles.id, tracker_titles.title_url, tracker_sites.site_class') |
| 227 | - ->from('tracker_titles') |
|
| 228 | - ->join('tracker_sites', 'tracker_sites.id = tracker_titles.site_id', 'left') |
|
| 229 | - ->where('tracker_titles.followed','N') |
|
| 230 | - ->where('tracker_titles !=', '255') |
|
| 231 | - ->where('tracker_sites.status', 'enabled') |
|
| 232 | - ->where('tracker_sites.use_custom', 'Y') |
|
| 233 | - ->get(); |
|
| 227 | + ->from('tracker_titles') |
|
| 228 | + ->join('tracker_sites', 'tracker_sites.id = tracker_titles.site_id', 'left') |
|
| 229 | + ->where('tracker_titles.followed','N') |
|
| 230 | + ->where('tracker_titles !=', '255') |
|
| 231 | + ->where('tracker_sites.status', 'enabled') |
|
| 232 | + ->where('tracker_sites.use_custom', 'Y') |
|
| 233 | + ->get(); |
|
| 234 | 234 | |
| 235 | 235 | if($query->num_rows() > 0) { |
| 236 | 236 | foreach($query->result() as $row) { |
@@ -241,8 +241,8 @@ discard block |
||
| 241 | 241 | |
| 242 | 242 | if(!empty($titleData)) { |
| 243 | 243 | $this->db->set($titleData) |
| 244 | - ->where('id', $row->id) |
|
| 245 | - ->update('tracker_titles'); |
|
| 244 | + ->where('id', $row->id) |
|
| 245 | + ->update('tracker_titles'); |
|
| 246 | 246 | |
| 247 | 247 | print "> {$row->site_class}:{$row->id}:{$row->title_url} FOLLOWED\n"; |
| 248 | 248 | } else { |
@@ -290,8 +290,8 @@ discard block |
||
| 290 | 290 | if($titleData['title'] && is_array($titleData) && !is_null($titleData['latest_chapter'])) { |
| 291 | 291 | if($titleData['title'] !== $row->title) { |
| 292 | 292 | $this->db->set('title', $titleData['title']) |
| 293 | - ->where('id', $row->id) |
|
| 294 | - ->update('tracker_titles'); |
|
| 293 | + ->where('id', $row->id) |
|
| 294 | + ->update('tracker_titles'); |
|
| 295 | 295 | //TODO: Add to history somehow? |
| 296 | 296 | print " - NEW TITLE ({$titleData['title']})\n"; |
| 297 | 297 | } else { |
@@ -301,8 +301,8 @@ discard block |
||
| 301 | 301 | //We might as well try to update as well. |
| 302 | 302 | if($this->Tracker->title->updateByID((int) $row->id, $titleData['latest_chapter'])) { |
| 303 | 303 | $this->db->set('last_checked', 'CURRENT_TIMESTAMP', FALSE) |
| 304 | - ->where('id', $row->id) |
|
| 305 | - ->update('tracker_titles'); |
|
| 304 | + ->where('id', $row->id) |
|
| 305 | + ->update('tracker_titles'); |
|
| 306 | 306 | } |
| 307 | 307 | } else { |
| 308 | 308 | log_message('error', "{$row->title} failed to update title successfully"); |
@@ -318,14 +318,14 @@ discard block |
||
| 318 | 318 | $date = $temp_now->format('Y-m-d'); |
| 319 | 319 | |
| 320 | 320 | $query = $this->db->select('1') |
| 321 | - ->from('site_stats') |
|
| 322 | - ->where('date', $date) |
|
| 323 | - ->get(); |
|
| 321 | + ->from('site_stats') |
|
| 322 | + ->where('date', $date) |
|
| 323 | + ->get(); |
|
| 324 | 324 | |
| 325 | 325 | if($query->num_rows() > 0) { |
| 326 | 326 | $this->db->set('total_requests', 'total_requests+1', FALSE) |
| 327 | - ->where('date', $date) |
|
| 328 | - ->update('site_stats'); |
|
| 327 | + ->where('date', $date) |
|
| 328 | + ->update('site_stats'); |
|
| 329 | 329 | } else { |
| 330 | 330 | $this->db->insert('site_stats', [ |
| 331 | 331 | 'date' => $date, |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare(strict_types=1); defined('BASEPATH') OR exit('No direct script access allowed'); |
|
| 1 | +<?php declare(strict_types=1); defined('BASEPATH') or exit('No direct script access allowed'); |
|
| 2 | 2 | |
| 3 | 3 | class Tracker_List_Model extends Tracker_Base_Model { |
| 4 | 4 | public function __construct() { |
@@ -114,11 +114,15 @@ |
||
| 114 | 114 | |
| 115 | 115 | if($sortOrder == 'asc') { |
| 116 | 116 | $unreadSort = ($a_text <=> $b_text); |
| 117 | - if($unreadSort) return $unreadSort; |
|
| 117 | + if($unreadSort) { |
|
| 118 | + return $unreadSort; |
|
| 119 | + } |
|
| 118 | 120 | return $a_text2 <=> $b_text2; |
| 119 | 121 | } else { |
| 120 | 122 | $unreadSort = ($a_text <=> $b_text); |
| 121 | - if($unreadSort) return $unreadSort; |
|
| 123 | + if($unreadSort) { |
|
| 124 | + return $unreadSort; |
|
| 125 | + } |
|
| 122 | 126 | return $b_text2 <=> $a_text2; |
| 123 | 127 | } |
| 124 | 128 | }); |
@@ -203,14 +203,14 @@ discard block |
||
| 203 | 203 | } |
| 204 | 204 | |
| 205 | 205 | $idQuery = $this->db->select('id') |
| 206 | - ->where('user_id', $userID) |
|
| 207 | - ->where('title_id', $titleID) |
|
| 208 | - ->get('tracker_chapters'); |
|
| 206 | + ->where('user_id', $userID) |
|
| 207 | + ->where('title_id', $titleID) |
|
| 208 | + ->get('tracker_chapters'); |
|
| 209 | 209 | if($idQuery->num_rows() > 0) { |
| 210 | 210 | $success = (bool) $this->db->set(['current_chapter' => $chapter, 'active' => 'Y', 'last_updated' => NULL, 'ignore_chapter' => NULL]) |
| 211 | - ->where('user_id', $userID) |
|
| 212 | - ->where('title_id', $titleID) |
|
| 213 | - ->update('tracker_chapters'); |
|
| 211 | + ->where('user_id', $userID) |
|
| 212 | + ->where('title_id', $titleID) |
|
| 213 | + ->update('tracker_chapters'); |
|
| 214 | 214 | |
| 215 | 215 | if($success) { |
| 216 | 216 | $idQueryRow = $idQuery->row(); |
@@ -236,9 +236,9 @@ discard block |
||
| 236 | 236 | } |
| 237 | 237 | public function updateByID(int $userID, int $chapterID, string $chapter) : bool { |
| 238 | 238 | $success = (bool) $this->db->set(['current_chapter' => $chapter, 'active' => 'Y', 'last_updated' => NULL]) |
| 239 | - ->where('user_id', $userID) |
|
| 240 | - ->where('id', $chapterID) |
|
| 241 | - ->update('tracker_chapters'); |
|
| 239 | + ->where('user_id', $userID) |
|
| 240 | + ->where('id', $chapterID) |
|
| 241 | + ->update('tracker_chapters'); |
|
| 242 | 242 | |
| 243 | 243 | if($success) { |
| 244 | 244 | $this->History->userUpdateTitle($chapterID, $chapter); |
@@ -248,9 +248,9 @@ discard block |
||
| 248 | 248 | |
| 249 | 249 | public function ignoreByID(int $userID, int $chapterID, string $chapter) : bool { |
| 250 | 250 | $success = (bool) $this->db->set(['ignore_chapter' => $chapter, 'active' => 'Y', 'last_updated' => NULL]) |
| 251 | - ->where('user_id', $userID) |
|
| 252 | - ->where('id', $chapterID) |
|
| 253 | - ->update('tracker_chapters'); |
|
| 251 | + ->where('user_id', $userID) |
|
| 252 | + ->where('id', $chapterID) |
|
| 253 | + ->update('tracker_chapters'); |
|
| 254 | 254 | |
| 255 | 255 | if($success) { |
| 256 | 256 | $this->History->userIgnoreTitle($chapterID, $chapter); |
@@ -263,9 +263,9 @@ discard block |
||
| 263 | 263 | //This is to allow user history to function properly. |
| 264 | 264 | |
| 265 | 265 | $success = $this->db->set(['active' => 'N', 'last_updated' => NULL]) |
| 266 | - ->where('user_id', $userID) |
|
| 267 | - ->where('id', $chapterID) |
|
| 268 | - ->update('tracker_chapters'); |
|
| 266 | + ->where('user_id', $userID) |
|
| 267 | + ->where('id', $chapterID) |
|
| 268 | + ->update('tracker_chapters'); |
|
| 269 | 269 | |
| 270 | 270 | return (bool) $success; |
| 271 | 271 | } |
@@ -295,10 +295,10 @@ discard block |
||
| 295 | 295 | //TODO: OPTION, USE BACKEND MAL ID DB WHERE POSSIBLE (DEFAULT TRUE) |
| 296 | 296 | |
| 297 | 297 | $queryC = $this->db->select('mal_id') |
| 298 | - ->where('user_id', $userID) |
|
| 299 | - ->where('title_id', $titleID) |
|
| 300 | - ->where('mal_id IS NOT NULL', NULL, FALSE) |
|
| 301 | - ->get('tracker_chapters'); |
|
| 298 | + ->where('user_id', $userID) |
|
| 299 | + ->where('title_id', $titleID) |
|
| 300 | + ->where('mal_id IS NOT NULL', NULL, FALSE) |
|
| 301 | + ->get('tracker_chapters'); |
|
| 302 | 302 | |
| 303 | 303 | if($queryC->num_rows() > 0 && ($rowC = $queryC->row())) { |
| 304 | 304 | $malIDArr = [ |
@@ -307,8 +307,8 @@ discard block |
||
| 307 | 307 | ]; |
| 308 | 308 | } else { |
| 309 | 309 | $queryT = $this->db->select('mal_id') |
| 310 | - ->where('id', $titleID) |
|
| 311 | - ->get('tracker_titles'); |
|
| 310 | + ->where('id', $titleID) |
|
| 311 | + ->get('tracker_titles'); |
|
| 312 | 312 | |
| 313 | 313 | if($queryT->num_rows() > 0 && ($rowT = $queryT->row())) { |
| 314 | 314 | $malIDArr = [ |
@@ -341,9 +341,9 @@ discard block |
||
| 341 | 341 | public function setMalID(int $userID, int $chapterID, ?int $malID) : bool { |
| 342 | 342 | //TODO: Handle NULL? |
| 343 | 343 | $success = (bool) $this->db->set(['mal_id' => $malID, 'active' => 'Y', 'last_updated' => NULL]) |
| 344 | - ->where('user_id', $userID) |
|
| 345 | - ->where('id', $chapterID) |
|
| 346 | - ->update('tracker_chapters'); |
|
| 344 | + ->where('user_id', $userID) |
|
| 345 | + ->where('id', $chapterID) |
|
| 346 | + ->update('tracker_chapters'); |
|
| 347 | 347 | |
| 348 | 348 | if($success) { |
| 349 | 349 | //MAL id update was successful, update history |
@@ -1,4 +1,4 @@ discard block |
||
| 1 | -<?php declare(strict_types=1); defined('BASEPATH') OR exit('No direct script access allowed'); |
|
| 1 | +<?php declare(strict_types = 1); defined('BASEPATH') OR exit('No direct script access allowed'); |
|
| 2 | 2 | |
| 3 | 3 | class Tracker_List_Model extends Tracker_Base_Model { |
| 4 | 4 | public function __construct() { |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | ]; |
| 34 | 34 | } |
| 35 | 35 | if($result->num_rows() > 0) { |
| 36 | - foreach ($result->result() as $row) { |
|
| 36 | + foreach($result->result() as $row) { |
|
| 37 | 37 | $is_unread = intval(($row->latest_chapter == $row->ignore_chapter) || ($row->latest_chapter == $row->current_chapter) ? '1' : '0'); |
| 38 | 38 | $arr['series'][$row->category]['unread_count'] = (($arr['series'][$row->category]['unread_count'] ?? 0) + !$is_unread); |
| 39 | 39 | $data = [ |
@@ -89,8 +89,8 @@ discard block |
||
| 89 | 89 | $sortOrder = $this->User_Options->get('list_sort_order', $userID); |
| 90 | 90 | switch($this->User_Options->get('list_sort_type', $userID)) { |
| 91 | 91 | case 'unread': |
| 92 | - foreach (array_keys($arr['series']) as $category) { |
|
| 93 | - usort($arr['series'][$category]['manga'], function ($a, $b) use($sortOrder) { |
|
| 92 | + foreach(array_keys($arr['series']) as $category) { |
|
| 93 | + usort($arr['series'][$category]['manga'], function($a, $b) use($sortOrder) { |
|
| 94 | 94 | $a_text = strtolower("{$a['new_chapter_exists']} - {$a['title_data']['title']}"); |
| 95 | 95 | $b_text = strtolower("{$b['new_chapter_exists']} - {$b['title_data']['title']}"); |
| 96 | 96 | |
@@ -104,8 +104,8 @@ discard block |
||
| 104 | 104 | break; |
| 105 | 105 | |
| 106 | 106 | case 'unread_latest': |
| 107 | - foreach (array_keys($arr['series']) as $category) { |
|
| 108 | - usort($arr['series'][$category]['manga'], function ($a, $b) use($sortOrder) { |
|
| 107 | + foreach(array_keys($arr['series']) as $category) { |
|
| 108 | + usort($arr['series'][$category]['manga'], function($a, $b) use($sortOrder) { |
|
| 109 | 109 | $a_text = $a['new_chapter_exists']; |
| 110 | 110 | $b_text = $b['new_chapter_exists']; |
| 111 | 111 | |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | break; |
| 127 | 127 | |
| 128 | 128 | case 'alphabetical': |
| 129 | - foreach (array_keys($arr['series']) as $category) { |
|
| 129 | + foreach(array_keys($arr['series']) as $category) { |
|
| 130 | 130 | usort($arr['series'][$category]['manga'], function($a, $b) use($sortOrder) { |
| 131 | 131 | $a_text = strtolower("{$a['title_data']['title']}"); |
| 132 | 132 | $b_text = strtolower("{$b['title_data']['title']}"); |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | break; |
| 142 | 142 | |
| 143 | 143 | case 'my_status': |
| 144 | - foreach (array_keys($arr['series']) as $category) { |
|
| 144 | + foreach(array_keys($arr['series']) as $category) { |
|
| 145 | 145 | usort($arr['series'][$category]['manga'], function($a, $b) use($sortOrder) { |
| 146 | 146 | $a_text = strtolower("{$a['generated_current_data']['number']}"); |
| 147 | 147 | $b_text = strtolower("{$b['generated_current_data']['number']}"); |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | break; |
| 157 | 157 | |
| 158 | 158 | case 'latest': |
| 159 | - foreach (array_keys($arr['series']) as $category) { |
|
| 159 | + foreach(array_keys($arr['series']) as $category) { |
|
| 160 | 160 | usort($arr['series'][$category]['manga'], function($a, $b) use($sortOrder) { |
| 161 | 161 | $a_text = new DateTime("{$a['title_data']['last_updated']}"); |
| 162 | 162 | $b_text = new DateTime("{$b['title_data']['last_updated']}"); |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php defined('BASEPATH') OR exit('No direct script access allowed'); |
|
| 1 | +<?php defined('BASEPATH') or exit('No direct script access allowed'); |
|
| 2 | 2 | |
| 3 | 3 | $active_group = 'default'; |
| 4 | 4 | $query_builder = TRUE; |
@@ -26,10 +26,10 @@ discard block |
||
| 26 | 26 | | always be used to set the mode correctly. |
| 27 | 27 | | |
| 28 | 28 | */ |
| 29 | -defined('FILE_READ_MODE') OR define('FILE_READ_MODE', 0644); |
|
| 29 | +defined('FILE_READ_MODE') OR define('FILE_READ_MODE', 0644); |
|
| 30 | 30 | defined('FILE_WRITE_MODE') OR define('FILE_WRITE_MODE', 0666); |
| 31 | -defined('DIR_READ_MODE') OR define('DIR_READ_MODE', 0755); |
|
| 32 | -defined('DIR_WRITE_MODE') OR define('DIR_WRITE_MODE', 0755); |
|
| 31 | +defined('DIR_READ_MODE') OR define('DIR_READ_MODE', 0755); |
|
| 32 | +defined('DIR_WRITE_MODE') OR define('DIR_WRITE_MODE', 0755); |
|
| 33 | 33 | |
| 34 | 34 | /* |
| 35 | 35 | |-------------------------------------------------------------------------- |
@@ -39,14 +39,14 @@ discard block |
||
| 39 | 39 | | These modes are used when working with fopen()/popen() |
| 40 | 40 | | |
| 41 | 41 | */ |
| 42 | -defined('FOPEN_READ') OR define('FOPEN_READ', 'rb'); |
|
| 43 | -defined('FOPEN_READ_WRITE') OR define('FOPEN_READ_WRITE', 'r+b'); |
|
| 44 | -defined('FOPEN_WRITE_CREATE_DESTRUCTIVE') OR define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care |
|
| 42 | +defined('FOPEN_READ') OR define('FOPEN_READ', 'rb'); |
|
| 43 | +defined('FOPEN_READ_WRITE') OR define('FOPEN_READ_WRITE', 'r+b'); |
|
| 44 | +defined('FOPEN_WRITE_CREATE_DESTRUCTIVE') OR define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care |
|
| 45 | 45 | defined('FOPEN_READ_WRITE_CREATE_DESCTRUCTIVE') OR define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care |
| 46 | -defined('FOPEN_WRITE_CREATE') OR define('FOPEN_WRITE_CREATE', 'ab'); |
|
| 47 | -defined('FOPEN_READ_WRITE_CREATE') OR define('FOPEN_READ_WRITE_CREATE', 'a+b'); |
|
| 48 | -defined('FOPEN_WRITE_CREATE_STRICT') OR define('FOPEN_WRITE_CREATE_STRICT', 'xb'); |
|
| 49 | -defined('FOPEN_READ_WRITE_CREATE_STRICT') OR define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b'); |
|
| 46 | +defined('FOPEN_WRITE_CREATE') OR define('FOPEN_WRITE_CREATE', 'ab'); |
|
| 47 | +defined('FOPEN_READ_WRITE_CREATE') OR define('FOPEN_READ_WRITE_CREATE', 'a+b'); |
|
| 48 | +defined('FOPEN_WRITE_CREATE_STRICT') OR define('FOPEN_WRITE_CREATE_STRICT', 'xb'); |
|
| 49 | +defined('FOPEN_READ_WRITE_CREATE_STRICT') OR define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b'); |
|
| 50 | 50 | |
| 51 | 51 | /* |
| 52 | 52 | |-------------------------------------------------------------------------- |
@@ -73,18 +73,18 @@ discard block |
||
| 73 | 73 | | http://tldp.org/LDP/abs/html/exitcodes.html |
| 74 | 74 | | |
| 75 | 75 | */ |
| 76 | -defined('EXIT_SUCCESS') OR define('EXIT_SUCCESS', 0); // no errors |
|
| 77 | -defined('EXIT_ERROR') OR define('EXIT_ERROR', 1); // generic error |
|
| 78 | -defined('EXIT_CONFIG') OR define('EXIT_CONFIG', 3); // configuration error |
|
| 79 | -defined('EXIT_UNKNOWN_FILE') OR define('EXIT_UNKNOWN_FILE', 4); // file not found |
|
| 80 | -defined('EXIT_UNKNOWN_CLASS') OR define('EXIT_UNKNOWN_CLASS', 5); // unknown class |
|
| 76 | +defined('EXIT_SUCCESS') OR define('EXIT_SUCCESS', 0); // no errors |
|
| 77 | +defined('EXIT_ERROR') OR define('EXIT_ERROR', 1); // generic error |
|
| 78 | +defined('EXIT_CONFIG') OR define('EXIT_CONFIG', 3); // configuration error |
|
| 79 | +defined('EXIT_UNKNOWN_FILE') OR define('EXIT_UNKNOWN_FILE', 4); // file not found |
|
| 80 | +defined('EXIT_UNKNOWN_CLASS') OR define('EXIT_UNKNOWN_CLASS', 5); // unknown class |
|
| 81 | 81 | defined('EXIT_UNKNOWN_METHOD') OR define('EXIT_UNKNOWN_METHOD', 6); // unknown class member |
| 82 | -defined('EXIT_USER_INPUT') OR define('EXIT_USER_INPUT', 7); // invalid user input |
|
| 83 | -defined('EXIT_DATABASE') OR define('EXIT_DATABASE', 8); // database error |
|
| 84 | -defined('EXIT__AUTO_MIN') OR define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code |
|
| 85 | -defined('EXIT__AUTO_MAX') OR define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code |
|
| 82 | +defined('EXIT_USER_INPUT') OR define('EXIT_USER_INPUT', 7); // invalid user input |
|
| 83 | +defined('EXIT_DATABASE') OR define('EXIT_DATABASE', 8); // database error |
|
| 84 | +defined('EXIT__AUTO_MIN') OR define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code |
|
| 85 | +defined('EXIT__AUTO_MAX') OR define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code |
|
| 86 | 86 | |
| 87 | 87 | /***** TIMEAGO CONSTANTS *****/ |
| 88 | 88 | defined('TIMEAGO_MONTH') OR define('TIMEAGO_MONTH', strtotime('-1 month')); //1 month ago |
| 89 | -defined('TIMEAGO_WEEK') OR define('TIMEAGO_WEEK', strtotime('-1 week')); //1 week ago |
|
| 90 | -defined('TIMEAGO_3DAY') OR define('TIMEAGO_3DAY', strtotime('-3 day')); //3 days ago |
|
| 89 | +defined('TIMEAGO_WEEK') OR define('TIMEAGO_WEEK', strtotime('-1 week')); //1 week ago |
|
| 90 | +defined('TIMEAGO_3DAY') OR define('TIMEAGO_3DAY', strtotime('-3 day')); //3 days ago |
|
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -defined('BASEPATH') OR exit('No direct script access allowed'); |
|
| 2 | +defined('BASEPATH') or exit('No direct script access allowed'); |
|
| 3 | 3 | |
| 4 | 4 | /* |
| 5 | 5 | |-------------------------------------------------------------------------- |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | | of this setting |
| 12 | 12 | | |
| 13 | 13 | */ |
| 14 | -defined('SHOW_DEBUG_BACKTRACE') OR define('SHOW_DEBUG_BACKTRACE', TRUE); |
|
| 14 | +defined('SHOW_DEBUG_BACKTRACE') or define('SHOW_DEBUG_BACKTRACE', TRUE); |
|
| 15 | 15 | |
| 16 | 16 | /* |
| 17 | 17 | |-------------------------------------------------------------------------- |
@@ -26,10 +26,10 @@ discard block |
||
| 26 | 26 | | always be used to set the mode correctly. |
| 27 | 27 | | |
| 28 | 28 | */ |
| 29 | -defined('FILE_READ_MODE') OR define('FILE_READ_MODE', 0644); |
|
| 30 | -defined('FILE_WRITE_MODE') OR define('FILE_WRITE_MODE', 0666); |
|
| 31 | -defined('DIR_READ_MODE') OR define('DIR_READ_MODE', 0755); |
|
| 32 | -defined('DIR_WRITE_MODE') OR define('DIR_WRITE_MODE', 0755); |
|
| 29 | +defined('FILE_READ_MODE') or define('FILE_READ_MODE', 0644); |
|
| 30 | +defined('FILE_WRITE_MODE') or define('FILE_WRITE_MODE', 0666); |
|
| 31 | +defined('DIR_READ_MODE') or define('DIR_READ_MODE', 0755); |
|
| 32 | +defined('DIR_WRITE_MODE') or define('DIR_WRITE_MODE', 0755); |
|
| 33 | 33 | |
| 34 | 34 | /* |
| 35 | 35 | |-------------------------------------------------------------------------- |
@@ -39,14 +39,14 @@ discard block |
||
| 39 | 39 | | These modes are used when working with fopen()/popen() |
| 40 | 40 | | |
| 41 | 41 | */ |
| 42 | -defined('FOPEN_READ') OR define('FOPEN_READ', 'rb'); |
|
| 43 | -defined('FOPEN_READ_WRITE') OR define('FOPEN_READ_WRITE', 'r+b'); |
|
| 44 | -defined('FOPEN_WRITE_CREATE_DESTRUCTIVE') OR define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care |
|
| 45 | -defined('FOPEN_READ_WRITE_CREATE_DESCTRUCTIVE') OR define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care |
|
| 46 | -defined('FOPEN_WRITE_CREATE') OR define('FOPEN_WRITE_CREATE', 'ab'); |
|
| 47 | -defined('FOPEN_READ_WRITE_CREATE') OR define('FOPEN_READ_WRITE_CREATE', 'a+b'); |
|
| 48 | -defined('FOPEN_WRITE_CREATE_STRICT') OR define('FOPEN_WRITE_CREATE_STRICT', 'xb'); |
|
| 49 | -defined('FOPEN_READ_WRITE_CREATE_STRICT') OR define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b'); |
|
| 42 | +defined('FOPEN_READ') or define('FOPEN_READ', 'rb'); |
|
| 43 | +defined('FOPEN_READ_WRITE') or define('FOPEN_READ_WRITE', 'r+b'); |
|
| 44 | +defined('FOPEN_WRITE_CREATE_DESTRUCTIVE') or define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care |
|
| 45 | +defined('FOPEN_READ_WRITE_CREATE_DESCTRUCTIVE') or define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care |
|
| 46 | +defined('FOPEN_WRITE_CREATE') or define('FOPEN_WRITE_CREATE', 'ab'); |
|
| 47 | +defined('FOPEN_READ_WRITE_CREATE') or define('FOPEN_READ_WRITE_CREATE', 'a+b'); |
|
| 48 | +defined('FOPEN_WRITE_CREATE_STRICT') or define('FOPEN_WRITE_CREATE_STRICT', 'xb'); |
|
| 49 | +defined('FOPEN_READ_WRITE_CREATE_STRICT') or define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b'); |
|
| 50 | 50 | |
| 51 | 51 | /* |
| 52 | 52 | |-------------------------------------------------------------------------- |
@@ -73,18 +73,18 @@ discard block |
||
| 73 | 73 | | http://tldp.org/LDP/abs/html/exitcodes.html |
| 74 | 74 | | |
| 75 | 75 | */ |
| 76 | -defined('EXIT_SUCCESS') OR define('EXIT_SUCCESS', 0); // no errors |
|
| 77 | -defined('EXIT_ERROR') OR define('EXIT_ERROR', 1); // generic error |
|
| 78 | -defined('EXIT_CONFIG') OR define('EXIT_CONFIG', 3); // configuration error |
|
| 79 | -defined('EXIT_UNKNOWN_FILE') OR define('EXIT_UNKNOWN_FILE', 4); // file not found |
|
| 80 | -defined('EXIT_UNKNOWN_CLASS') OR define('EXIT_UNKNOWN_CLASS', 5); // unknown class |
|
| 81 | -defined('EXIT_UNKNOWN_METHOD') OR define('EXIT_UNKNOWN_METHOD', 6); // unknown class member |
|
| 82 | -defined('EXIT_USER_INPUT') OR define('EXIT_USER_INPUT', 7); // invalid user input |
|
| 83 | -defined('EXIT_DATABASE') OR define('EXIT_DATABASE', 8); // database error |
|
| 84 | -defined('EXIT__AUTO_MIN') OR define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code |
|
| 85 | -defined('EXIT__AUTO_MAX') OR define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code |
|
| 76 | +defined('EXIT_SUCCESS') or define('EXIT_SUCCESS', 0); // no errors |
|
| 77 | +defined('EXIT_ERROR') or define('EXIT_ERROR', 1); // generic error |
|
| 78 | +defined('EXIT_CONFIG') or define('EXIT_CONFIG', 3); // configuration error |
|
| 79 | +defined('EXIT_UNKNOWN_FILE') or define('EXIT_UNKNOWN_FILE', 4); // file not found |
|
| 80 | +defined('EXIT_UNKNOWN_CLASS') or define('EXIT_UNKNOWN_CLASS', 5); // unknown class |
|
| 81 | +defined('EXIT_UNKNOWN_METHOD') or define('EXIT_UNKNOWN_METHOD', 6); // unknown class member |
|
| 82 | +defined('EXIT_USER_INPUT') or define('EXIT_USER_INPUT', 7); // invalid user input |
|
| 83 | +defined('EXIT_DATABASE') or define('EXIT_DATABASE', 8); // database error |
|
| 84 | +defined('EXIT__AUTO_MIN') or define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code |
|
| 85 | +defined('EXIT__AUTO_MAX') or define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code |
|
| 86 | 86 | |
| 87 | 87 | /***** TIMEAGO CONSTANTS *****/ |
| 88 | -defined('TIMEAGO_MONTH') OR define('TIMEAGO_MONTH', strtotime('-1 month')); //1 month ago |
|
| 89 | -defined('TIMEAGO_WEEK') OR define('TIMEAGO_WEEK', strtotime('-1 week')); //1 week ago |
|
| 90 | -defined('TIMEAGO_3DAY') OR define('TIMEAGO_3DAY', strtotime('-3 day')); //3 days ago |
|
| 88 | +defined('TIMEAGO_MONTH') or define('TIMEAGO_MONTH', strtotime('-1 month')); //1 month ago |
|
| 89 | +defined('TIMEAGO_WEEK') or define('TIMEAGO_WEEK', strtotime('-1 week')); //1 week ago |
|
| 90 | +defined('TIMEAGO_3DAY') or define('TIMEAGO_3DAY', strtotime('-3 day')); //3 days ago |
|
@@ -16,16 +16,16 @@ discard block |
||
| 16 | 16 | $usedCategories = $this->Tracker->category->getUsed($this->User->id); |
| 17 | 17 | |
| 18 | 18 | //NOTE: The checkbox validation is handled in run() |
| 19 | - $this->form_validation->set_rules('category_custom_1_text', 'Custom Category 1 Text', 'trim|regex_match[/^[a-zA-Z0-9-_\\s]{0,16}$/]'); |
|
| 20 | - $this->form_validation->set_rules('category_custom_2_text', 'Custom Category 2 Text', 'trim|regex_match[/^[a-zA-Z0-9-_\\s]{0,16}$/]'); |
|
| 21 | - $this->form_validation->set_rules('category_custom_3_text', 'Custom Category 3 Text', 'trim|regex_match[/^[a-zA-Z0-9-_\\s]{0,16}$/]'); |
|
| 19 | + $this->form_validation->set_rules('category_custom_1_text', 'Custom Category 1 Text', 'trim|regex_match[/^[a-zA-Z0-9-_\\s]{0,16}$/]'); |
|
| 20 | + $this->form_validation->set_rules('category_custom_2_text', 'Custom Category 2 Text', 'trim|regex_match[/^[a-zA-Z0-9-_\\s]{0,16}$/]'); |
|
| 21 | + $this->form_validation->set_rules('category_custom_3_text', 'Custom Category 3 Text', 'trim|regex_match[/^[a-zA-Z0-9-_\\s]{0,16}$/]'); |
|
| 22 | 22 | $this->form_validation->set_rules('default_series_category', 'Default Series Category', 'required|is_valid_option_value[default_series_category]'); |
| 23 | - $this->form_validation->set_rules('list_sort_type', 'List Sort Type', 'required|is_valid_option_value[list_sort_type]'); |
|
| 24 | - $this->form_validation->set_rules('list_sort_order', 'List Sort Order', 'required|is_valid_option_value[list_sort_order]'); |
|
| 25 | - $this->form_validation->set_rules('theme', 'Theme', 'required|is_valid_option_value[theme]'); |
|
| 26 | - $this->form_validation->set_rules('mal_sync', 'MAL Sync', 'required|is_valid_option_value[mal_sync]'); |
|
| 23 | + $this->form_validation->set_rules('list_sort_type', 'List Sort Type', 'required|is_valid_option_value[list_sort_type]'); |
|
| 24 | + $this->form_validation->set_rules('list_sort_order', 'List Sort Order', 'required|is_valid_option_value[list_sort_order]'); |
|
| 25 | + $this->form_validation->set_rules('theme', 'Theme', 'required|is_valid_option_value[theme]'); |
|
| 26 | + $this->form_validation->set_rules('mal_sync', 'MAL Sync', 'required|is_valid_option_value[mal_sync]'); |
|
| 27 | 27 | |
| 28 | - if ($isValid = $this->form_validation->run() === TRUE) { |
|
| 28 | + if($isValid = $this->form_validation->run() === TRUE) { |
|
| 29 | 29 | foreach($customCategories as $categoryK => $category) { |
| 30 | 30 | if(!in_array($categoryK, $usedCategories)) { |
| 31 | 31 | $this->User_Options->set($category, $this->input->post($category) ? 'enabled' : 'disabled'); |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | |
| 39 | 39 | $this->User_Options->set('enable_live_countdown_timer', $this->input->post('enable_live_countdown_timer')); |
| 40 | 40 | |
| 41 | - $this->User_Options->set('list_sort_type', $this->input->post('list_sort_type')); |
|
| 41 | + $this->User_Options->set('list_sort_type', $this->input->post('list_sort_type')); |
|
| 42 | 42 | $this->User_Options->set('list_sort_order', $this->input->post('list_sort_order')); |
| 43 | 43 | |
| 44 | 44 | $this->User_Options->set('theme', $this->input->post('theme')); |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php defined('BASEPATH') OR exit('No direct script access allowed'); |
|
| 1 | +<?php defined('BASEPATH') or exit('No direct script access allowed'); |
|
| 2 | 2 | |
| 3 | 3 | class MY_Security extends CI_Security { |
| 4 | 4 | public function __construct() { |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare(strict_types=1); defined('BASEPATH') OR exit('No direct script access allowed'); |
|
| 1 | +<?php declare(strict_types = 1); defined('BASEPATH') OR exit('No direct script access allowed'); |
|
| 2 | 2 | |
| 3 | 3 | class AdminPanel extends Admin_Controller { |
| 4 | 4 | public function __construct() { |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare(strict_types=1); defined('BASEPATH') OR exit('No direct script access allowed'); |
|
| 1 | +<?php declare(strict_types=1); defined('BASEPATH') or exit('No direct script access allowed'); |
|
| 2 | 2 | |
| 3 | 3 | class AdminPanel extends Admin_Controller { |
| 4 | 4 | public function __construct() { |
@@ -40,12 +40,12 @@ |
||
| 40 | 40 | |
| 41 | 41 | private function _list_complete_titles() { |
| 42 | 42 | $query = $this->db->select('tracker_titles.id, tracker_sites.site_class, tracker_titles.title, tracker_titles.title_url') |
| 43 | - ->from('tracker_chapters') |
|
| 44 | - ->join('tracker_titles', 'tracker_chapters.title_id = tracker_titles.id', 'left') |
|
| 45 | - ->join('tracker_sites', 'tracker_sites.id = tracker_titles.site_id', 'left') |
|
| 46 | - ->like('tracker_chapters.tags', 'complete') |
|
| 47 | - ->where('tracker_titles.status', 0) |
|
| 48 | - ->get(); |
|
| 43 | + ->from('tracker_chapters') |
|
| 44 | + ->join('tracker_titles', 'tracker_chapters.title_id = tracker_titles.id', 'left') |
|
| 45 | + ->join('tracker_sites', 'tracker_sites.id = tracker_titles.site_id', 'left') |
|
| 46 | + ->like('tracker_chapters.tags', 'complete') |
|
| 47 | + ->where('tracker_titles.status', 0) |
|
| 48 | + ->get(); |
|
| 49 | 49 | |
| 50 | 50 | $completeList = []; |
| 51 | 51 | if($query->num_rows() > 0) { |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare(strict_types=1); defined('BASEPATH') OR exit('No direct script access allowed'); |
|
| 1 | +<?php declare(strict_types = 1); defined('BASEPATH') OR exit('No direct script access allowed'); |
|
| 2 | 2 | |
| 3 | 3 | class UpdateStatus extends MY_Controller { |
| 4 | 4 | public function __construct() { |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare(strict_types=1); defined('BASEPATH') OR exit('No direct script access allowed'); |
|
| 1 | +<?php declare(strict_types=1); defined('BASEPATH') or exit('No direct script access allowed'); |
|
| 2 | 2 | |
| 3 | 3 | class UpdateStatus extends MY_Controller { |
| 4 | 4 | public function __construct() { |
@@ -26,8 +26,8 @@ discard block |
||
| 26 | 26 | * URL: /ajax/update_inline |
| 27 | 27 | */ |
| 28 | 28 | public function update() : void { |
| 29 | - $this->form_validation->set_rules('id', 'Chapter ID', 'required|ctype_digit'); |
|
| 30 | - $this->form_validation->set_rules('chapter', 'Chapter', 'required'); |
|
| 29 | + $this->form_validation->set_rules('id', 'Chapter ID', 'required|ctype_digit'); |
|
| 30 | + $this->form_validation->set_rules('chapter', 'Chapter', 'required'); |
|
| 31 | 31 | |
| 32 | 32 | if($this->form_validation->run() === TRUE) { |
| 33 | 33 | $success = $this->Tracker->list->updateByID($this->userID, $this->input->post('id'), $this->input->post('chapter')); |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | * URL: /tag_update |
| 123 | 123 | */ |
| 124 | 124 | public function tag_update() : void { |
| 125 | - $this->form_validation->set_rules('id', 'Chapter ID', 'required|ctype_digit'); |
|
| 125 | + $this->form_validation->set_rules('id', 'Chapter ID', 'required|ctype_digit'); |
|
| 126 | 126 | $this->form_validation->set_rules('tag_string', 'Tag String', 'max_length[255]|is_valid_tag_string|not_equals[none]'); |
| 127 | 127 | |
| 128 | 128 | if($this->form_validation->run() === TRUE) { |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | * URL: /set_category |
| 170 | 170 | */ |
| 171 | 171 | public function set_category() : void { |
| 172 | - $this->form_validation->set_rules('id[]', 'List of IDs', 'required|ctype_digit'); |
|
| 172 | + $this->form_validation->set_rules('id[]', 'List of IDs', 'required|ctype_digit'); |
|
| 173 | 173 | $this->form_validation->set_rules('category', 'Category Name', 'required|is_valid_category'); |
| 174 | 174 | |
| 175 | 175 | if($this->form_validation->run() === TRUE) { |
@@ -215,8 +215,8 @@ discard block |
||
| 215 | 215 | * URL: /ajax/ignore_inline |
| 216 | 216 | */ |
| 217 | 217 | public function ignore() : void { |
| 218 | - $this->form_validation->set_rules('id', 'Chapter ID', 'required|ctype_digit'); |
|
| 219 | - $this->form_validation->set_rules('chapter', 'Chapter', 'required'); |
|
| 218 | + $this->form_validation->set_rules('id', 'Chapter ID', 'required|ctype_digit'); |
|
| 219 | + $this->form_validation->set_rules('chapter', 'Chapter', 'required'); |
|
| 220 | 220 | |
| 221 | 221 | if($this->form_validation->run() === TRUE) { |
| 222 | 222 | $success = $this->Tracker->list->ignoreByID($this->userID, $this->input->post('id'), $this->input->post('chapter')); |
@@ -238,8 +238,8 @@ discard block |
||
| 238 | 238 | * URL: /set_mal_id |
| 239 | 239 | */ |
| 240 | 240 | public function set_mal_id() : void { |
| 241 | - $this->form_validation->set_rules('id', 'Chapter ID', 'required|ctype_digit'); |
|
| 242 | - $this->form_validation->set_rules('mal_id', 'MAL ID', 'regex_match[/^[0-9]*$/]'); |
|
| 241 | + $this->form_validation->set_rules('id', 'Chapter ID', 'required|ctype_digit'); |
|
| 242 | + $this->form_validation->set_rules('mal_id', 'MAL ID', 'regex_match[/^[0-9]*$/]'); |
|
| 243 | 243 | |
| 244 | 244 | if($this->form_validation->run() === TRUE) { |
| 245 | 245 | $malID = (is_numeric($this->input->post('mal_id')) ? $this->input->post('mal_id') : NULL); |