Completed
Pull Request — master (#182)
by
unknown
02:36
created
application/config/ion_auth.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -66,8 +66,8 @@  discard block
 block discarded – undo
66 66
  | salt_prefix: Used for bcrypt. Versions of PHP before 5.3.7 only support "$2a$" as the salt prefix
67 67
  | Versions 5.3.7 or greater should use the default of "$2y$".
68 68
  */
69
-$config['hash_method']    = 'bcrypt';	// sha1 or bcrypt, bcrypt is STRONGLY recommended
70
-$config['default_rounds'] = 8;		// This does not apply if random_rounds is set to true
69
+$config['hash_method']    = 'bcrypt'; // sha1 or bcrypt, bcrypt is STRONGLY recommended
70
+$config['default_rounds'] = 8; // This does not apply if random_rounds is set to true
71 71
 $config['random_rounds']  = FALSE;
72 72
 $config['min_rounds']     = 5;
73 73
 $config['max_rounds']     = 9;
@@ -82,22 +82,22 @@  discard block
 block discarded – undo
82 82
  | The controller should check this function and act
83 83
  | appropriately. If this variable set to 0, there is no maximum.
84 84
  */
85
-$config['site_title']                 = "Manga Tracker";        // Site Title, example.com
86
-$config['admin_email']                = "[email protected]";  // Admin Email, [email protected] //FIXME: This is being used for a lot of things it shouldn't be. We need a diff config option.
87
-$config['default_group']              = 'members';              // Default group, use name
88
-$config['admin_group']                = 'admin';                // Default administrators group, use name
89
-$config['identity']                   = 'email';                // [NOTE: username can be used too] You can use any unique column in your table as identity column. The values in this column, alongside password, will be used for login purposes
90
-$config['min_password_length']        = 6;                      // Minimum Required Length of Password
91
-$config['max_password_length']        = 64;                     // Maximum Allowed Length of Password
92
-$config['email_activation']           = FALSE;                  // Email Activation for registration
93
-$config['manual_activation']          = FALSE;                  // Manual Activation for registration
94
-$config['remember_users']             = TRUE;                   // Allow users to be remembered and enable auto-login
85
+$config['site_title']                 = "Manga Tracker"; // Site Title, example.com
86
+$config['admin_email']                = "[email protected]"; // Admin Email, [email protected] //FIXME: This is being used for a lot of things it shouldn't be. We need a diff config option.
87
+$config['default_group']              = 'members'; // Default group, use name
88
+$config['admin_group']                = 'admin'; // Default administrators group, use name
89
+$config['identity']                   = 'email'; // [NOTE: username can be used too] You can use any unique column in your table as identity column. The values in this column, alongside password, will be used for login purposes
90
+$config['min_password_length']        = 6; // Minimum Required Length of Password
91
+$config['max_password_length']        = 64; // Maximum Allowed Length of Password
92
+$config['email_activation']           = FALSE; // Email Activation for registration
93
+$config['manual_activation']          = FALSE; // Manual Activation for registration
94
+$config['remember_users']             = TRUE; // Allow users to be remembered and enable auto-login
95 95
 $config['user_expire']                = 259200; /*3DAYS*/       // How long to remember the user (seconds). Set to zero for no expiration
96
-$config['user_extend_on_login']       = TRUE;                   // Extend the users cookies every time they auto-login
97
-$config['track_login_attempts']       = FALSE;                  // Track the number of failed login attempts for each user or ip. //CHECK: Should this be true?
98
-$config['track_login_ip_address']     = TRUE;                   // Track login attempts by IP Address, if FALSE will track based on identity. (Default: TRUE)
99
-$config['maximum_login_attempts']     = 3;                      // The maximum number of failed login attempts.
100
-$config['lockout_time']               = 600;                    // The number of seconds to lockout an account due to exceeded attempts
96
+$config['user_extend_on_login']       = TRUE; // Extend the users cookies every time they auto-login
97
+$config['track_login_attempts']       = FALSE; // Track the number of failed login attempts for each user or ip. //CHECK: Should this be true?
98
+$config['track_login_ip_address']     = TRUE; // Track login attempts by IP Address, if FALSE will track based on identity. (Default: TRUE)
99
+$config['maximum_login_attempts']     = 3; // The maximum number of failed login attempts.
100
+$config['lockout_time']               = 600; // The number of seconds to lockout an account due to exceeded attempts
101 101
 $config['forgot_password_expiration'] = 43200000; /*12HR*/      // The number of milliseconds after which a forgot password request will expire. If set to 0, forgot password requests will not expire.
102 102
 
103 103
 /*
@@ -175,11 +175,11 @@  discard block
 block discarded – undo
175 175
  | Message Delimiters.
176 176
  | -------------------------------------------------------------------------
177 177
  */
178
-$config['delimiters_source']       = 'config'; 	// "config" = use the settings defined here, "form_validation" = use the settings defined in CI's form validation library
179
-$config['message_start_delimiter'] = '<p>'; 	// Message start delimiter
180
-$config['message_end_delimiter']   = '</p>'; 	// Message end delimiter
181
-$config['error_start_delimiter']   = '<p>';		// Error message start delimiter
182
-$config['error_end_delimiter']     = '</p>';	// Error message end delimiter
178
+$config['delimiters_source']       = 'config'; // "config" = use the settings defined here, "form_validation" = use the settings defined in CI's form validation library
179
+$config['message_start_delimiter'] = '<p>'; // Message start delimiter
180
+$config['message_end_delimiter']   = '</p>'; // Message end delimiter
181
+$config['error_start_delimiter']   = '<p>'; // Error message start delimiter
182
+$config['error_end_delimiter']     = '</p>'; // Error message end delimiter
183 183
 
184 184
 /* End of file ion_auth.php */
185 185
 /* Location: ./application/config/ion_auth.php */
Please login to merge, or discard this patch.
application/models/Tracker/Sites/WorldThree.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
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 WorldThree extends Base_FoolSlide_Site_Model {
4 4
 	public $baseURL = 'http://www.slide.world-three.org';
Please login to merge, or discard this patch.
application/models/Tracker/Sites/WhiteCloudPavillion.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
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 WhiteCloudPavillion extends Base_FoolSlide_Site_Model {
4 4
 	public $baseURL = 'https://archangelscans.com/free';
Please login to merge, or discard this patch.
application/models/History_Model.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
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 History_Model extends CI_Model {
4 4
 	public function __construct() {
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 			foreach($result as $row) {
50 50
 				$arrRow = [];
51 51
 
52
-				$arrRow['updated_at']  = $row->updated_at;
52
+				$arrRow['updated_at'] = $row->updated_at;
53 53
 
54 54
 				$newChapterData = $this->Tracker->sites->{$row->site_class}->getChapterData($row->title_url, $row->new_chapter);
55 55
 				$arrRow['new_chapter']      = "<a href=\"{$newChapterData['url']}\">{$newChapterData['number']}</a>";
Please login to merge, or discard this patch.
application/models/User_Options_Model.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
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 User_Options_Model extends CI_Model {
4 4
 	public $options = array(
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 			$query = $this->db->select('value_str, value_int')
201 201
 			                  ->from('user_options')
202 202
 			                  ->where('user_id', $userID)
203
-			                  ->where('name',    $option)
203
+			                  ->where('name', $option)
204 204
 			                  ->limit(1);
205 205
 			$data = $query->get()->row_array();
206 206
 		} else {
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 				$query = $this->db->select('value_str, value_int')
209 209
 				                  ->from('user_options')
210 210
 				                  ->where('user_id', $userID)
211
-				                  ->where('name',    $option)
211
+				                  ->where('name', $option)
212 212
 				                  ->limit(1);
213 213
 				$data = $query->get()->row_array();
214 214
 				$this->session->set_tempdata("option_{$option}", $data, 3600);
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
 			);
262 262
 			//FIXME: Get a better solution than str_replace for removing special characters
263 263
 			$elements = array();
264
-			foreach (array_values($this->options[$option]['valid_options']) as $valid_option) {
264
+			foreach(array_values($this->options[$option]['valid_options']) as $valid_option) {
265 265
 				$elements[$option.'_'.str_replace(',', '_', $valid_option)] = array_merge($base_attributes, array(
266 266
 					'value' => $valid_option
267 267
 				));
Please login to merge, or discard this patch.
application/models/Tracker/Tracker_List_Model.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
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() {
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 			];
30 30
 		}
31 31
 		if($query->num_rows() > 0) {
32
-			foreach ($query->result() as $row) {
32
+			foreach($query->result() as $row) {
33 33
 				$is_unread = intval(($row->latest_chapter == $row->ignore_chapter) || ($row->latest_chapter == $row->current_chapter) ? '1' : '0');
34 34
 				$arr['series'][$row->category]['unread_count'] = (($arr['series'][$row->category]['unread_count'] ?? 0) + !$is_unread);
35 35
 				$data = [
@@ -84,8 +84,8 @@  discard block
 block discarded – undo
84 84
 			$sortOrder = $this->User_Options->get('list_sort_order', $userID);
85 85
 			switch($this->User_Options->get('list_sort_type', $userID)) {
86 86
 				case 'unread':
87
-					foreach (array_keys($arr['series']) as $category) {
88
-						usort($arr['series'][$category]['manga'], function ($a, $b) use($sortOrder) {
87
+					foreach(array_keys($arr['series']) as $category) {
88
+						usort($arr['series'][$category]['manga'], function($a, $b) use($sortOrder) {
89 89
 							$a_text = strtolower("{$a['new_chapter_exists']} - {$a['title_data']['title']}");
90 90
 							$b_text = strtolower("{$b['new_chapter_exists']} - {$b['title_data']['title']}");
91 91
 
@@ -99,8 +99,8 @@  discard block
 block discarded – undo
99 99
 					break;
100 100
 
101 101
 				case 'unread_latest':
102
-					foreach (array_keys($arr['series']) as $category) {
103
-						usort($arr['series'][$category]['manga'], function ($a, $b) use($sortOrder) {
102
+					foreach(array_keys($arr['series']) as $category) {
103
+						usort($arr['series'][$category]['manga'], function($a, $b) use($sortOrder) {
104 104
 							$a_text = $a['new_chapter_exists'];
105 105
 							$b_text = $b['new_chapter_exists'];
106 106
 
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 					break;
122 122
 
123 123
 				case 'alphabetical':
124
-					foreach (array_keys($arr['series']) as $category) {
124
+					foreach(array_keys($arr['series']) as $category) {
125 125
 						usort($arr['series'][$category]['manga'], function($a, $b) use($sortOrder) {
126 126
 							$a_text = strtolower("{$a['title_data']['title']}");
127 127
 							$b_text = strtolower("{$b['title_data']['title']}");
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 					break;
137 137
 
138 138
 				case 'my_status':
139
-					foreach (array_keys($arr['series']) as $category) {
139
+					foreach(array_keys($arr['series']) as $category) {
140 140
 						usort($arr['series'][$category]['manga'], function($a, $b) use($sortOrder) {
141 141
 							$a_text = strtolower("{$a['generated_current_data']['number']}");
142 142
 							$b_text = strtolower("{$b['generated_current_data']['number']}");
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 					break;
152 152
 
153 153
 				case 'latest':
154
-					foreach (array_keys($arr['series']) as $category) {
154
+					foreach(array_keys($arr['series']) as $category) {
155 155
 						usort($arr['series'][$category]['manga'], function($a, $b) use($sortOrder) {
156 156
 							$a_text = new DateTime("{$a['title_data']['last_updated']}");
157 157
 							$b_text = new DateTime("{$b['title_data']['last_updated']}");
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 		return $status;
284 284
 	}
285 285
 
286
-	public function getMalID(int $userID, int $titleID) : ?array{
286
+	public function getMalID(int $userID, int $titleID) : ? array{
287 287
 		$malIDArr = NULL;
288 288
 
289 289
 		//NEW METHOD
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
 			                  ->get('tracker_chapters');
322 322
 
323 323
 			if($queryC2->num_rows() > 0 && ($tag_string = $queryC2->row()->tags) && !is_null($tag_string)) {
324
-				$arr   = preg_grep('/^mal:([0-9]+|none)$/', explode(',', $tag_string));
324
+				$arr = preg_grep('/^mal:([0-9]+|none)$/', explode(',', $tag_string));
325 325
 				if(!empty($arr)) {
326 326
 					$malIDArr = [
327 327
 						'id'   => explode(':', $arr[0])[1],
Please login to merge, or discard this patch.
application/models/Tracker/Tracker_Base_Model.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
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_Base_Model extends CI_Model {
4 4
 	public $sites;
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 			$this->enabledCategories['custom3'] = $this->User_Options->get('category_custom_3_text');
27 27
 		}
28 28
 
29
-		foreach (glob(APPPATH.'models/Tracker/Sites/*.php') as $filename) {
29
+		foreach(glob(APPPATH.'models/Tracker/Sites/*.php') as $filename) {
30 30
 			/** @noinspection PhpIncludeInspection */
31 31
 			include_once $filename;
32 32
 		}
Please login to merge, or discard this patch.
application/models/Tracker/Sites/HotChocolateScans.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
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 HotChocolateScans extends Base_FoolSlide_Site_Model {
4 4
 	public $baseURL = 'http://hotchocolatescans.com/fs';
Please login to merge, or discard this patch.
application/controllers/User/PublicList.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -63,12 +63,12 @@
 block discarded – undo
63 63
 		if($show_404) show_404();
64 64
 	}
65 65
 
66
-	private function _walk_recursive_remove (array $array, callable $callback) : array {
67
-		foreach ($array as $k => $v) {
68
-			if (is_array($v)) {
66
+	private function _walk_recursive_remove(array $array, callable $callback) : array {
67
+		foreach($array as $k => $v) {
68
+			if(is_array($v)) {
69 69
 				$array[$k] = $this->_walk_recursive_remove($v, $callback);
70 70
 			} else {
71
-				if ($callback($v, $k)) {
71
+				if($callback($v, $k)) {
72 72
 					unset($array[$k]);
73 73
 				}
74 74
 			}
Please login to merge, or discard this patch.