Completed
Push — master ( 477aa2...0a4bb5 )
by Angus
06:22
created
application/controllers/User/Options.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -16,16 +16,16 @@  discard block
 block discarded – undo
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
 block discarded – undo
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'));
Please login to merge, or discard this patch.
application/controllers/Ajax/TrackerInline.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -26,8 +26,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.
application/config/monolog.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
 $config['file_multiline'] = TRUE; //add newlines to the output
32 32
 
33 33
 /* NEW RELIC OPTIONS */
34
-$config['new_relic_app_name'] = 'APP NAME - ' . ENVIRONMENT;
34
+$config['new_relic_app_name'] = 'APP NAME - '.ENVIRONMENT;
35 35
 
36 36
 /* HIPCHAT OPTIONS */
37 37
 $config['hipchat_app_token'] = ''; //HipChat API Token
Please login to merge, or discard this patch.
application/views/User/Dashboard.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -149,7 +149,7 @@
 block discarded – undo
149 149
 						|
150 150
 						<a href="#" class="set-mal-id" data-mal-id="<?=$row['mal_id']?>" data-mal-type="<?=$row['mal_type']?>">Set MAL ID</a> <?php if(!is_null($row['mal_id']) && $row['mal_type'] == 'chapter') { ?><span>(<small><?=($row['mal_id'] !== '0' ? $row['mal_id'] : 'none')?></small>)</span><?php } ?>
151 151
 						|
152
-						Tags (<a href="#" class="edit-tags small">Edit</a>): <span class="text-lowercase tag-list"><?=($row['has_tags'] ? implode("", array_map(function ($str) { return "<i class='tag'>{$str}</i>"; }, explode(",", $row['tag_list']))) : "none")?></span>
152
+						Tags (<a href="#" class="edit-tags small">Edit</a>): <span class="text-lowercase tag-list"><?=($row['has_tags'] ? implode("", array_map(function($str) { return "<i class='tag'>{$str}</i>"; }, explode(",", $row['tag_list']))) : "none")?></span>
153 153
 						<div class="input-group tag-edit" hidden>
154 154
 							<input type="text" class="form-control" placeholder="tag1,tag2,tag3" maxlength="255" pattern='[a-z0-9-_,]{0,255}' value="<?=$row['tag_list']?>">
155 155
 							<span class="input-group-btn">
Please login to merge, or discard this patch.
_scripts/generate_foolslide.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 	private $className;
10 10
 
11 11
 	public function __construct() {
12
-		if(isset($_SERVER['argv']) && count($_SERVER['argv']) === 3){
12
+		if(isset($_SERVER['argv']) && count($_SERVER['argv']) === 3) {
13 13
 			$this->baseURL   = rtrim($_SERVER['argv'][1], '/');
14 14
 			$this->className = $_SERVER['argv'][2];
15 15
 
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 
30 30
 		$this->updateDocs();
31 31
 
32
-		$domain =  preg_replace('#^https?://(.*?)(?:/.*?)?$#', '$1', $this->baseURL);
32
+		$domain = preg_replace('#^https?://(.*?)(?:/.*?)?$#', '$1', $this->baseURL);
33 33
 		say("\nAdmin SQL:");
34 34
 		say("INSERT INTO `mangatracker_development`.`tracker_sites` (`id`, `site`, `site_class`, `status`, `use_custom`) VALUES (NULL, '{$domain}', '{$this->className}', 'enabled', 'Y');");
35 35
 		say("INSERT INTO `mangatracker_production`.`tracker_sites` (`id`, `site`, `site_class`, `status`, `use_custom`) VALUES (NULL, '{$domain}', '{$this->className}', 'enabled', 'Y');");
@@ -108,12 +108,12 @@  discard block
 block discarded – undo
108 108
 
109 109
 		//Update @updated
110 110
 		$currentDate = date("Y-m-d", time());
111
-		$baseFile = str_replace("@updated      {$matches[1]}","@updated      {$currentDate}", $baseFile);
111
+		$baseFile = str_replace("@updated      {$matches[1]}", "@updated      {$currentDate}", $baseFile);
112 112
 
113 113
 		//Update @version
114 114
 		$currentVersion = explode('.', $matches[2]);
115
-		$newVersion = "{$currentVersion[0]}.{$currentVersion[1]}.". (((int) $currentVersion[2]) + 1);
116
-		$baseFile = str_replace("@version      {$matches[2]}","@version      {$newVersion}", $baseFile);
115
+		$newVersion = "{$currentVersion[0]}.{$currentVersion[1]}.".(((int) $currentVersion[2]) + 1);
116
+		$baseFile = str_replace("@version      {$matches[2]}", "@version      {$newVersion}", $baseFile);
117 117
 
118 118
 		//Add @require
119 119
 		// @resource     fontAwesome
Please login to merge, or discard this patch.
application/models/Tracker_Model.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php declare(strict_types=1); defined('BASEPATH') OR exit('No direct script access allowed');
2 2
 
3 3
 include_once APPPATH.'models/Tracker/Tracker_Base_Model.php';
4
-foreach (glob(APPPATH.'models/Tracker/*.php') as $filename) {
4
+foreach(glob(APPPATH.'models/Tracker/*.php') as $filename) {
5 5
 	/** @noinspection PhpIncludeInspection */
6 6
 	include_once $filename;
7 7
 }
Please login to merge, or discard this patch.
application/models/User_Options_Model.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -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/History_Model.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
 			foreach($result as $row) {
58 58
 				$arrRow = [];
59 59
 
60
-				$arrRow['updated_at']  = $row->updated_at;
60
+				$arrRow['updated_at'] = $row->updated_at;
61 61
 
62 62
 				$newChapterData = $this->Tracker->sites->{$row->site_class}->getChapterData($row->title_url, $row->new_chapter);
63 63
 				$arrRow['new_chapter']      = "<a href=\"{$newChapterData['url']}\">{$newChapterData['number']}</a>";
Please login to merge, or discard this patch.
application/models/Tracker/Tracker_Stats_Model.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 				], FALSE)
29 29
 				->from('tracker_chapters')
30 30
 				->join('tracker_titles', 'tracker_titles.id = tracker_chapters.title_id', 'left')
31
-				->join('tracker_sites','tracker_titles.site_id = tracker_sites.id', 'left')
31
+				->join('tracker_sites', 'tracker_titles.site_id = tracker_sites.id', 'left')
32 32
 				->where('tracker_sites.status', 'enabled')
33 33
 				->group_by('tracker_chapters.title_id')
34 34
 				->having('count > 1')
Please login to merge, or discard this patch.