Completed
Push — master ( 1aabad...056f30 )
by Angus
02:36
created
application/models/Tracker/Tracker_Admin_Model.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -75,8 +75,8 @@  discard block
 block discarded – undo
75 75
 						//Make sure last_checked is always updated on successful run.
76 76
 						//CHECK: Is there a reason we aren't just doing this in updateByID?
77 77
 						$this->db->set('last_checked', 'CURRENT_TIMESTAMP', FALSE)
78
-						         ->where('id', $row->id)
79
-						         ->update('tracker_titles');
78
+								 ->where('id', $row->id)
79
+								 ->update('tracker_titles');
80 80
 
81 81
 						print " - ({$titleData['latest_chapter']})\n";
82 82
 					}
@@ -94,9 +94,9 @@  discard block
 block discarded – undo
94 94
 	 */
95 95
 	public function updateCustom() {
96 96
 		$query = $this->db->select('*')
97
-		                  ->from('tracker_sites')
98
-		                  ->where('status', 'enabled')
99
-		                  ->get();
97
+						  ->from('tracker_sites')
98
+						  ->where('status', 'enabled')
99
+						  ->get();
100 100
 
101 101
 		$sites = $query->result_array();
102 102
 		foreach ($sites as $site) {
@@ -111,8 +111,8 @@  discard block
 block discarded – undo
111 111
 									//Make sure last_checked is always updated on successful run.
112 112
 									//CHECK: Is there a reason we aren't just doing this in updateByID?
113 113
 									$this->db->set('last_checked', 'CURRENT_TIMESTAMP', FALSE)
114
-									         ->where('id', $titleID)
115
-									         ->update('tracker_titles');
114
+											 ->where('id', $titleID)
115
+											 ->update('tracker_titles');
116 116
 
117 117
 									print " - ({$titleData['latest_chapter']})\n";
118 118
 								} else {
@@ -169,8 +169,8 @@  discard block
 block discarded – undo
169 169
 				if($titleData['title'] && is_array($titleData) && !is_null($titleData['latest_chapter'])) {
170 170
 					if($titleData['title'] !== $row->title) {
171 171
 						$this->db->set('title', $titleData['title'])
172
-						         ->where('id', $row->id)
173
-						         ->update('tracker_titles');
172
+								 ->where('id', $row->id)
173
+								 ->update('tracker_titles');
174 174
 						//TODO: Add to history somehow?
175 175
 						print " - NEW TITLE ({$titleData['title']})\n";
176 176
 					} else {
@@ -180,8 +180,8 @@  discard block
 block discarded – undo
180 180
 					//We might as well try to update as well.
181 181
 					if($this->Tracker->title->updateByID((int) $row->id, $titleData['latest_chapter'])) {
182 182
 						$this->db->set('last_checked', 'CURRENT_TIMESTAMP', FALSE)
183
-						         ->where('id', $row->id)
184
-						         ->update('tracker_titles');
183
+								 ->where('id', $row->id)
184
+								 ->update('tracker_titles');
185 185
 					}
186 186
 				} else {
187 187
 					log_message('error', "{$row->title} failed to update title successfully");
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 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_Admin_Model extends Tracker_Base_Model {
4 4
 	public function __construct() {
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 		// @formatter:on
66 66
 
67 67
 		if($query->num_rows() > 0) {
68
-			foreach ($query->result() as $row) {
68
+			foreach($query->result() as $row) {
69 69
 				print "> {$row->title} <{$row->site_class}>"; //Print this prior to doing anything so we can more easily find out if something went wrong
70 70
 				$titleData = $this->sites->{$row->site_class}->getTitleData($row->title_url);
71 71
 				if(is_array($titleData) && !is_null($titleData['latest_chapter'])) {
@@ -99,9 +99,9 @@  discard block
 block discarded – undo
99 99
 		                  ->get();
100 100
 
101 101
 		$sites = $query->result_array();
102
-		foreach ($sites as $site) {
102
+		foreach($sites as $site) {
103 103
 			if($titleDataList = $this->sites->{$site['site_class']}->doCustomUpdate()) {
104
-				foreach ($titleDataList as $titleURL => $titleData) {
104
+				foreach($titleDataList as $titleURL => $titleData) {
105 105
 					print "> {$titleData['title']} <{$site['site_class']}>"; //Print this prior to doing anything so we can more easily find out if something went wrong
106 106
 					if(is_array($titleData) && !is_null($titleData['latest_chapter'])) {
107 107
 						if($dbTitleData = $this->Tracker->title->getID($titleURL, (int) $site['id'], FALSE, TRUE)) {
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 		// @formatter:on
164 164
 
165 165
 		if($query->num_rows() > 0) {
166
-			foreach ($query->result() as $row) {
166
+			foreach($query->result() as $row) {
167 167
 				print "> {$row->title} <{$row->site_class}>"; //Print this prior to doing anything so we can more easily find out if something went wrong
168 168
 				$titleData = $this->sites->{$row->site_class}->getTitleData($row->title_url);
169 169
 				if($titleData['title'] && is_array($titleData) && !is_null($titleData['latest_chapter'])) {
Please login to merge, or discard this patch.