@@ -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); |
@@ -6,7 +6,9 @@ discard block |
||
| 6 | 6 | } |
| 7 | 7 | |
| 8 | 8 | public function index(int $page = 1) : void { |
| 9 | - if($page === 0) redirect('user/history/1'); |
|
| 9 | + if($page === 0) { |
|
| 10 | + redirect('user/history/1'); |
|
| 11 | + } |
|
| 10 | 12 | |
| 11 | 13 | $this->header_data['title'] = "History"; |
| 12 | 14 | $this->header_data['page'] = "history"; |
@@ -16,7 +18,9 @@ discard block |
||
| 16 | 18 | $this->body_data['currentPage'] = (int) $page; |
| 17 | 19 | $this->body_data['totalPages'] = $historyData['totalPages']; |
| 18 | 20 | |
| 19 | - if($page > $this->body_data['totalPages'] && $page > 1) redirect('user/history/1'); |
|
| 21 | + if($page > $this->body_data['totalPages'] && $page > 1) { |
|
| 22 | + redirect('user/history/1'); |
|
| 23 | + } |
|
| 20 | 24 | |
| 21 | 25 | $this->_render_page('User/History'); |
| 22 | 26 | } |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | |
| 32 | 32 | case 'csv': |
| 33 | 33 | $this->output->set_content_type('text/csv', 'utf-8'); |
| 34 | - $this->_render_content($this->Tracker->portation->arrayToCSVRecursive($historyData, 'Date/Time,Title,URL,Site,Status'), 'csv',TRUE, 'tracker-history'); |
|
| 34 | + $this->_render_content($this->Tracker->portation->arrayToCSVRecursive($historyData, 'Date/Time,Title,URL,Site,Status'), 'csv', TRUE, 'tracker-history'); |
|
| 35 | 35 | break; |
| 36 | 36 | |
| 37 | 37 | default: |
@@ -60,7 +60,9 @@ |
||
| 60 | 60 | $show_404 = TRUE; |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | - if($show_404) show_404(); |
|
| 63 | + if($show_404) { |
|
| 64 | + show_404(); |
|
| 65 | + } |
|
| 64 | 66 | } |
| 65 | 67 | |
| 66 | 68 | private function _walk_recursive_remove (array $array, callable $callback) : array { |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | // break; |
| 27 | 27 | |
| 28 | 28 | case 'html': |
| 29 | - $this->body_data['trackerData'] = $trackerData['series']; |
|
| 29 | + $this->body_data['trackerData'] = $trackerData['series']; |
|
| 30 | 30 | |
| 31 | 31 | $this->header_data['show_header'] = FALSE; |
| 32 | 32 | $this->footer_data['show_footer'] = FALSE; |
@@ -62,12 +62,12 @@ discard block |
||
| 62 | 62 | if($show_404) show_404(); |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | - private function _walk_recursive_remove (array $array, callable $callback) : array { |
|
| 66 | - foreach ($array as $k => $v) { |
|
| 67 | - if (is_array($v)) { |
|
| 65 | + private function _walk_recursive_remove(array $array, callable $callback) : array { |
|
| 66 | + foreach($array as $k => $v) { |
|
| 67 | + if(is_array($v)) { |
|
| 68 | 68 | $array[$k] = $this->_walk_recursive_remove($v, $callback); |
| 69 | 69 | } else { |
| 70 | - if ($callback($v, $k)) { |
|
| 70 | + if($callback($v, $k)) { |
|
| 71 | 71 | unset($array[$k]); |
| 72 | 72 | } |
| 73 | 73 | } |