@@ -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 Stats extends MY_Controller { |
| 4 | 4 | public function __construct() { |
@@ -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 Import_AMR extends User_Controller { |
| 4 | 4 | public function __construct() { |
@@ -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 TitleHistory extends Auth_Controller { |
| 4 | 4 | public function __construct() { |
@@ -23,7 +23,9 @@ |
||
| 23 | 23 | $this->body_data['totalPages'] = $historyData['totalPages']; |
| 24 | 24 | $this->body_data['titleID'] = (int) $titleID; |
| 25 | 25 | |
| 26 | - if($page > $this->body_data['totalPages'] && $page > 1) redirect("/history/{$titleID}/1"); |
|
| 26 | + if($page > $this->body_data['totalPages'] && $page > 1) { |
|
| 27 | + redirect("/history/{$titleID}/1"); |
|
| 28 | + } |
|
| 27 | 29 | |
| 28 | 30 | $this->_render_page("TitleHistory"); |
| 29 | 31 | |
@@ -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 History_Model extends CI_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 History_Model extends CI_Model { |
| 4 | 4 | public function __construct() { |
@@ -49,7 +49,7 @@ discard block |
||
| 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>"; |
@@ -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_Stats_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_Stats_Model extends Tracker_Base_Model { |
| 4 | 4 | public function __construct() { |
@@ -28,7 +28,7 @@ discard block |
||
| 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 | ->group_by('tracker_chapters.title_id') |
| 33 | 33 | ->having('count > 1') |
| 34 | 34 | ->order_by('count DESC') |
@@ -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 | //http://english.stackexchange.com/a/141735 |
| 4 | 4 | class Tracker_Portation_Model extends Tracker_Base_Model { |
@@ -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 | //http://english.stackexchange.com/a/141735 |
| 4 | 4 | class Tracker_Portation_Model extends Tracker_Base_Model { |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | |
| 62 | 62 | $arr = []; |
| 63 | 63 | if($query->num_rows() > 0) { |
| 64 | - foreach ($query->result() as $row) { |
|
| 64 | + foreach($query->result() as $row) { |
|
| 65 | 65 | $arr[$row->category][] = [ |
| 66 | 66 | 'site' => $row->site, |
| 67 | 67 | 'title_url' => $row->title_url, |
@@ -94,15 +94,15 @@ discard block |
||
| 94 | 94 | $enclosure_esc = preg_quote($enclosure, '/'); |
| 95 | 95 | |
| 96 | 96 | $output = array(); |
| 97 | - foreach ($fields as $field) { |
|
| 98 | - if ($field === NULL && $nullToMysqlNull) { |
|
| 97 | + foreach($fields as $field) { |
|
| 98 | + if($field === NULL && $nullToMysqlNull) { |
|
| 99 | 99 | $output[] = 'NULL'; |
| 100 | 100 | continue; |
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | // Enclose fields containing $delimiter, $enclosure or whitespace |
| 104 | - if ($encloseAll || preg_match("/(?:${delimiter_esc}|${enclosure_esc}|\s)/", $field)) { |
|
| 105 | - $output[] = $enclosure . str_replace($enclosure, $enclosure . $enclosure, $field) . $enclosure; |
|
| 104 | + if($encloseAll || preg_match("/(?:${delimiter_esc}|${enclosure_esc}|\s)/", $field)) { |
|
| 105 | + $output[] = $enclosure.str_replace($enclosure, $enclosure.$enclosure, $field).$enclosure; |
|
| 106 | 106 | } else { |
| 107 | 107 | $output[] = $field; |
| 108 | 108 | } |
@@ -116,10 +116,10 @@ discard block |
||
| 116 | 116 | $csvArr[] = $headers; |
| 117 | 117 | } |
| 118 | 118 | |
| 119 | - foreach ($fields as $field) { |
|
| 120 | - $csvArr[] = $this->arrayToCSV($field, $delimiter, $enclosure,$encloseAll,$nullToMysqlNull); |
|
| 119 | + foreach($fields as $field) { |
|
| 120 | + $csvArr[] = $this->arrayToCSV($field, $delimiter, $enclosure, $encloseAll, $nullToMysqlNull); |
|
| 121 | 121 | } |
| 122 | 122 | |
| 123 | - return implode(PHP_EOL,$csvArr); |
|
| 123 | + return implode(PHP_EOL, $csvArr); |
|
| 124 | 124 | } |
| 125 | 125 | } |
@@ -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_Favourites_Model extends Tracker_Base_Model { |
| 4 | 4 | public function __construct() { |
@@ -71,32 +71,32 @@ |
||
| 71 | 71 | |
| 72 | 72 | ////We need the series to be tracked |
| 73 | 73 | $idCQuery = $this->db->select('id') |
| 74 | - ->where('user_id', $userID) |
|
| 75 | - ->where('title_id', $titleID) |
|
| 76 | - ->get('tracker_chapters'); |
|
| 74 | + ->where('user_id', $userID) |
|
| 75 | + ->where('title_id', $titleID) |
|
| 76 | + ->get('tracker_chapters'); |
|
| 77 | 77 | if(!($idCQuery->num_rows() > 0)) { |
| 78 | 78 | //NOTE: This pretty much repeats a lot of what we already did above. Is there a better way to do this? |
| 79 | 79 | $this->Tracker->list->update($userID, $site, $title, $chapter, FALSE); |
| 80 | 80 | |
| 81 | 81 | $idCQuery = $this->db->select('id') |
| 82 | - ->where('user_id', $userID) |
|
| 83 | - ->where('title_id', $titleID) |
|
| 84 | - ->get('tracker_chapters'); |
|
| 82 | + ->where('user_id', $userID) |
|
| 83 | + ->where('title_id', $titleID) |
|
| 84 | + ->get('tracker_chapters'); |
|
| 85 | 85 | } |
| 86 | 86 | if($idCQuery->num_rows() > 0) { |
| 87 | 87 | $idCQueryRow = $idCQuery->row(); |
| 88 | 88 | |
| 89 | 89 | //Check if it is already favourited |
| 90 | 90 | $idFQuery = $this->db->select('id') |
| 91 | - ->where('chapter_id', $idCQueryRow->id) |
|
| 92 | - ->where('chapter', $chapter) |
|
| 93 | - ->get('tracker_favourites'); |
|
| 91 | + ->where('chapter_id', $idCQueryRow->id) |
|
| 92 | + ->where('chapter', $chapter) |
|
| 93 | + ->get('tracker_favourites'); |
|
| 94 | 94 | if($idFQuery->num_rows() > 0) { |
| 95 | 95 | //Chapter is already favourited, so remove it from DB |
| 96 | 96 | $idFQueryRow = $idFQuery->row(); |
| 97 | 97 | |
| 98 | 98 | $isSuccess = (bool) $this->db->where('id', $idFQueryRow->id) |
| 99 | - ->delete('tracker_favourites'); |
|
| 99 | + ->delete('tracker_favourites'); |
|
| 100 | 100 | |
| 101 | 101 | if($isSuccess) { |
| 102 | 102 | $success = array( |
@@ -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_Favourites_Model extends Tracker_Base_Model { |
| 4 | 4 | public function __construct() { |
@@ -14,8 +14,8 @@ discard block |
||
| 14 | 14 | tf.chapter, tf.updated_at', FALSE) |
| 15 | 15 | ->from('tracker_favourites AS tf') |
| 16 | 16 | ->join('tracker_chapters AS tc', 'tf.chapter_id = tc.id', 'left') |
| 17 | - ->join('tracker_titles AS tt', 'tc.title_id = tt.id', 'left') |
|
| 18 | - ->join('tracker_sites AS ts', 'tt.site_id = ts.id', 'left') |
|
| 17 | + ->join('tracker_titles AS tt', 'tc.title_id = tt.id', 'left') |
|
| 18 | + ->join('tracker_sites AS ts', 'tt.site_id = ts.id', 'left') |
|
| 19 | 19 | ->where('tc.user_id', $this->User->id) //CHECK: Is this inefficient? Would it be better to have a user_id column in tracker_favourites? |
| 20 | 20 | ->order_by('tf.id DESC') |
| 21 | 21 | ->limit($rowsPerPage, ($rowsPerPage * ($page - 1))) |
@@ -50,8 +50,8 @@ discard block |
||
| 50 | 50 | tf.chapter, tf.updated_at', FALSE) |
| 51 | 51 | ->from('tracker_favourites AS tf') |
| 52 | 52 | ->join('tracker_chapters AS tc', 'tf.chapter_id = tc.id', 'left') |
| 53 | - ->join('tracker_titles AS tt', 'tc.title_id = tt.id', 'left') |
|
| 54 | - ->join('tracker_sites AS ts', 'tt.site_id = ts.id', 'left') |
|
| 53 | + ->join('tracker_titles AS tt', 'tc.title_id = tt.id', 'left') |
|
| 54 | + ->join('tracker_sites AS ts', 'tt.site_id = ts.id', 'left') |
|
| 55 | 55 | ->where('tc.user_id', $this->User->id) //CHECK: Is this inefficient? Would it be better to have a user_id column in tracker_favourites? |
| 56 | 56 | ->order_by('tf.id DESC') |
| 57 | 57 | ->get(); |
@@ -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_Base_Model extends CI_Model { |
| 4 | 4 | public $sites; |
@@ -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_Base_Model extends CI_Model { |
| 4 | 4 | public $sites; |
@@ -26,7 +26,7 @@ discard block |
||
| 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 | } |
@@ -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() { |
@@ -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 @@ 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() { |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | // @formatter:on |
| 76 | 76 | |
| 77 | 77 | if($query->num_rows() > 0) { |
| 78 | - foreach ($query->result() as $row) { |
|
| 78 | + foreach($query->result() as $row) { |
|
| 79 | 79 | print "> {$row->title} <{$row->site_class} - {$row->title_url}> | <{$row->title_id}>"; //Print this prior to doing anything so we can more easily find out if something went wrong |
| 80 | 80 | $titleData = $this->sites->{$row->site_class}->getTitleData($row->title_url); |
| 81 | 81 | if(is_array($titleData) && !is_null($titleData['latest_chapter'])) { |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | $query = $query->get(); |
| 154 | 154 | |
| 155 | 155 | if($query->num_rows() > 0) { |
| 156 | - foreach ($query->result() as $row) { |
|
| 156 | + foreach($query->result() as $row) { |
|
| 157 | 157 | print "> {$row->title} <{$row->site_class} - {$row->title_url}> | <{$row->title_id}>"; //Print this prior to doing anything so we can more easily find out if something went wrong |
| 158 | 158 | $titleData = $this->sites->{$row->site_class}->getTitleData($row->title_url); |
| 159 | 159 | if(is_array($titleData) && !is_null($titleData['latest_chapter'])) { |
@@ -194,10 +194,10 @@ discard block |
||
| 194 | 194 | ->get(); |
| 195 | 195 | |
| 196 | 196 | $sites = $query->result_array(); |
| 197 | - foreach ($sites as $site) { |
|
| 197 | + foreach($sites as $site) { |
|
| 198 | 198 | $siteClass = $this->sites->{$site['site_class']}; |
| 199 | 199 | if($titleDataList = $siteClass->doCustomUpdate()) { |
| 200 | - foreach ($titleDataList as $titleURL => $titleData) { |
|
| 200 | + foreach($titleDataList as $titleURL => $titleData) { |
|
| 201 | 201 | print "> {$titleData['title']} <{$site['site_class']}>"; //Print this prior to doing anything so we can more easily find out if something went wrong |
| 202 | 202 | if(is_array($titleData) && !is_null($titleData['latest_chapter'])) { |
| 203 | 203 | if($dbTitleData = $this->Tracker->title->getID($titleURL, (int) $site['id'], FALSE, TRUE)) { |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | $query = $this->db->select('tracker_titles.id, tracker_titles.title_url, tracker_sites.site_class') |
| 240 | 240 | ->from('tracker_titles') |
| 241 | 241 | ->join('tracker_sites', 'tracker_sites.id = tracker_titles.site_id', 'left') |
| 242 | - ->where('tracker_titles.followed','N') |
|
| 242 | + ->where('tracker_titles.followed', 'N') |
|
| 243 | 243 | ->where('tracker_titles !=', '255') |
| 244 | 244 | ->where('tracker_sites.status', 'enabled') |
| 245 | 245 | ->where('tracker_sites.use_custom', 'Y') |
@@ -297,7 +297,7 @@ discard block |
||
| 297 | 297 | // @formatter:on |
| 298 | 298 | |
| 299 | 299 | if($query->num_rows() > 0) { |
| 300 | - foreach ($query->result() as $row) { |
|
| 300 | + foreach($query->result() as $row) { |
|
| 301 | 301 | print "> {$row->title} <{$row->site_class}>"; //Print this prior to doing anything so we can more easily find out if something went wrong |
| 302 | 302 | $titleData = $this->sites->{$row->site_class}->getTitleData($row->title_url); |
| 303 | 303 | if($titleData['title'] && is_array($titleData) && !is_null($titleData['latest_chapter'])) { |