@@ -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_Issue_Model extends Tracker_Base_Model { |
| 4 | 4 | public function __construct() { |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | //TEMP |
| 80 | 80 | $route['user/dashboard_beta'] = 'User/DashboardBeta'; |
| 81 | 81 | |
| 82 | -$route['api/internal/get_list'] = 'API/Internal/GetList'; |
|
| 82 | +$route['api/internal/get_list'] = 'API/Internal/GetList'; |
|
| 83 | 83 | $route['api/internal/get_list/(all|reading|on-hold|plan-to-read|(custom(?:1|2|3)))'] = 'API/Internal/GetList/index/$1'; |
| 84 | 84 | |
| 85 | 85 | $route['ajax/username_check']['post'] = 'Ajax/UsernameCheck'; //rate limited |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | |
| 102 | 102 | $route['import_amr'] = 'Import_AMR'; |
| 103 | 103 | |
| 104 | -$route['report_issue'] = 'ReportIssue'; |
|
| 104 | +$route['report_issue'] = 'ReportIssue'; |
|
| 105 | 105 | |
| 106 | 106 | $route['stats'] = 'Stats'; |
| 107 | 107 | $route['help'] = 'Help'; |
@@ -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 | ->where('tracker_sites.status', 'enabled') |
| 33 | 33 | ->group_by('tracker_chapters.title_id') |
| 34 | 34 | ->having('count > 1') |
@@ -1,4 +1,4 @@ discard block |
||
| 1 | -<?php declare(strict_types=1); |
|
| 1 | +<?php declare(strict_types = 1); |
|
| 2 | 2 | |
| 3 | 3 | if(!extension_loaded('gd')) die('GD ext is required to run this!'); |
| 4 | 4 | |
@@ -9,7 +9,7 @@ discard block |
||
| 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 |
||
| 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');"); |
@@ -97,12 +97,12 @@ discard block |
||
| 97 | 97 | |
| 98 | 98 | //Update @updated |
| 99 | 99 | $currentDate = date("Y-m-d", time()); |
| 100 | - $baseFile = str_replace("@updated {$matches[1]}","@updated {$currentDate}", $baseFile); |
|
| 100 | + $baseFile = str_replace("@updated {$matches[1]}", "@updated {$currentDate}", $baseFile); |
|
| 101 | 101 | |
| 102 | 102 | //Update @version |
| 103 | 103 | $currentVersion = explode('.', $matches[2]); |
| 104 | - $newVersion = "{$currentVersion[0]}.{$currentVersion[1]}.". (((int) $currentVersion[2]) + 1); |
|
| 105 | - $baseFile = str_replace("@version {$matches[2]}","@version {$newVersion}", $baseFile); |
|
| 104 | + $newVersion = "{$currentVersion[0]}.{$currentVersion[1]}.".(((int) $currentVersion[2]) + 1); |
|
| 105 | + $baseFile = str_replace("@version {$matches[2]}", "@version {$newVersion}", $baseFile); |
|
| 106 | 106 | |
| 107 | 107 | //Add @require |
| 108 | 108 | // @resource fontAwesome |
@@ -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_List_Model extends Tracker_Base_Model { |
| 4 | 4 | public function __construct() { |
@@ -33,13 +33,13 @@ discard block |
||
| 33 | 33 | ]; |
| 34 | 34 | } |
| 35 | 35 | if($result->num_rows() > 0) { |
| 36 | - foreach ($result->result() as $row) { |
|
| 36 | + foreach($result->result() as $row) { |
|
| 37 | 37 | $is_unread = intval((is_null($row->latest_chapter)) || ($row->latest_chapter == $row->ignore_chapter) || ($row->latest_chapter == $row->current_chapter) ? '1' : '0'); |
| 38 | 38 | $arr['series'][$row->category]['unread_count'] = (($arr['series'][$row->category]['unread_count'] ?? 0) + !$is_unread); |
| 39 | 39 | $data = [ |
| 40 | 40 | 'id' => $row->id, |
| 41 | 41 | 'generated_current_data' => $this->sites->{$row->site_class}->getChapterData($row->title_url, $row->current_chapter), |
| 42 | - 'generated_latest_data' => !is_null($row->latest_chapter) ? $this->sites->{$row->site_class}->getChapterData($row->title_url, $row->latest_chapter) : ['url' => '#', 'number' => 'No chapters found'] , |
|
| 42 | + 'generated_latest_data' => !is_null($row->latest_chapter) ? $this->sites->{$row->site_class}->getChapterData($row->title_url, $row->latest_chapter) : ['url' => '#', 'number' => 'No chapters found'], |
|
| 43 | 43 | 'generated_ignore_data' => ($row->ignore_chapter ? $this->sites->{$row->site_class}->getChapterData($row->title_url, $row->ignore_chapter) : NULL), |
| 44 | 44 | |
| 45 | 45 | 'full_title_url' => $this->sites->{$row->site_class}->getFullTitleURL($row->title_url), |
@@ -89,8 +89,8 @@ discard block |
||
| 89 | 89 | $sortOrder = $this->User_Options->get('list_sort_order', $userID); |
| 90 | 90 | switch($this->User_Options->get('list_sort_type', $userID)) { |
| 91 | 91 | case 'unread': |
| 92 | - foreach (array_keys($arr['series']) as $category) { |
|
| 93 | - usort($arr['series'][$category]['manga'], function ($a, $b) use($sortOrder) { |
|
| 92 | + foreach(array_keys($arr['series']) as $category) { |
|
| 93 | + usort($arr['series'][$category]['manga'], function($a, $b) use($sortOrder) { |
|
| 94 | 94 | $a_text = strtolower("{$a['new_chapter_exists']} - {$a['title_data']['title']}"); |
| 95 | 95 | $b_text = strtolower("{$b['new_chapter_exists']} - {$b['title_data']['title']}"); |
| 96 | 96 | |
@@ -104,8 +104,8 @@ discard block |
||
| 104 | 104 | break; |
| 105 | 105 | |
| 106 | 106 | case 'unread_latest': |
| 107 | - foreach (array_keys($arr['series']) as $category) { |
|
| 108 | - usort($arr['series'][$category]['manga'], function ($a, $b) use($sortOrder) { |
|
| 107 | + foreach(array_keys($arr['series']) as $category) { |
|
| 108 | + usort($arr['series'][$category]['manga'], function($a, $b) use($sortOrder) { |
|
| 109 | 109 | $a_text = $a['new_chapter_exists']; |
| 110 | 110 | $b_text = $b['new_chapter_exists']; |
| 111 | 111 | |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | break; |
| 127 | 127 | |
| 128 | 128 | case 'alphabetical': |
| 129 | - foreach (array_keys($arr['series']) as $category) { |
|
| 129 | + foreach(array_keys($arr['series']) as $category) { |
|
| 130 | 130 | usort($arr['series'][$category]['manga'], function($a, $b) use($sortOrder) { |
| 131 | 131 | $a_text = strtolower("{$a['title_data']['title']}"); |
| 132 | 132 | $b_text = strtolower("{$b['title_data']['title']}"); |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | break; |
| 142 | 142 | |
| 143 | 143 | case 'my_status': |
| 144 | - foreach (array_keys($arr['series']) as $category) { |
|
| 144 | + foreach(array_keys($arr['series']) as $category) { |
|
| 145 | 145 | usort($arr['series'][$category]['manga'], function($a, $b) use($sortOrder) { |
| 146 | 146 | $a_text = strtolower("{$a['generated_current_data']['number']}"); |
| 147 | 147 | $b_text = strtolower("{$b['generated_current_data']['number']}"); |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | break; |
| 157 | 157 | |
| 158 | 158 | case 'latest': |
| 159 | - foreach (array_keys($arr['series']) as $category) { |
|
| 159 | + foreach(array_keys($arr['series']) as $category) { |
|
| 160 | 160 | usort($arr['series'][$category]['manga'], function($a, $b) use($sortOrder) { |
| 161 | 161 | $a_text = new DateTime("{$a['title_data']['last_updated']}"); |
| 162 | 162 | $b_text = new DateTime("{$b['title_data']['last_updated']}"); |
@@ -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 | /** |
| 4 | 4 | * Class Tracker_Sites_Model |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | |
| 165 | 165 | $ch = curl_init(); |
| 166 | 166 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
| 167 | - curl_setopt($ch, CURLOPT_ENCODING , "gzip"); |
|
| 167 | + curl_setopt($ch, CURLOPT_ENCODING, "gzip"); |
|
| 168 | 168 | //curl_setopt($ch, CURLOPT_VERBOSE, 1); |
| 169 | 169 | curl_setopt($ch, CURLOPT_HEADER, 1); |
| 170 | 170 | |
@@ -186,8 +186,8 @@ discard block |
||
| 186 | 186 | curl_setopt($ch, CURLOPT_URL, $url); |
| 187 | 187 | |
| 188 | 188 | if($isPost) { |
| 189 | - curl_setopt($ch,CURLOPT_POST, count($postFields)); |
|
| 190 | - curl_setopt($ch,CURLOPT_POSTFIELDS, http_build_query($postFields)); |
|
| 189 | + curl_setopt($ch, CURLOPT_POST, count($postFields)); |
|
| 190 | + curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postFields)); |
|
| 191 | 191 | } |
| 192 | 192 | |
| 193 | 193 | $response = curl_exec($ch); |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | $result = shell_exec('python '.APPPATH.'../_scripts/get_cloudflare_cookie.py '.escapeshellarg(json_encode($urlData))); |
| 235 | 235 | $cookieData = json_decode($result, TRUE); |
| 236 | 236 | |
| 237 | - $this->cache->save("cloudflare_{$this->site}", $cookieData['cookies'], 31536000 /* 1 year, or until we renew it */); |
|
| 237 | + $this->cache->save("cloudflare_{$this->site}", $cookieData['cookies'], 31536000 /* 1 year, or until we renew it */); |
|
| 238 | 238 | log_message('debug', "Saving CloudFlare Cookies for {$this->site}"); |
| 239 | 239 | |
| 240 | 240 | $refresh = TRUE; |
@@ -286,7 +286,7 @@ discard block |
||
| 286 | 286 | |
| 287 | 287 | $dom = new DOMDocument(); |
| 288 | 288 | libxml_use_internal_errors(TRUE); |
| 289 | - $dom->loadHTML('<?xml encoding="utf-8" ?>' . $data); |
|
| 289 | + $dom->loadHTML('<?xml encoding="utf-8" ?>'.$data); |
|
| 290 | 290 | libxml_use_internal_errors(FALSE); |
| 291 | 291 | |
| 292 | 292 | $xpath = new DOMXPath($dom); |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | if($nodes_title->length === 1) { |
| 296 | 296 | if($nodes_row->length === 1) { |
| 297 | 297 | $firstRow = $nodes_row->item(0); |
| 298 | - $nodes_latest = $xpath->query($node_latest_string, $firstRow); |
|
| 298 | + $nodes_latest = $xpath->query($node_latest_string, $firstRow); |
|
| 299 | 299 | |
| 300 | 300 | if($node_chapter_string !== '') { |
| 301 | 301 | $nodes_chapter = $xpath->query($node_chapter_string, $firstRow); |
@@ -501,7 +501,7 @@ discard block |
||
| 501 | 501 | $chapter_parts = explode('/', $chapter); //returns #LANG#/#VOLUME#/#CHAPTER#/#CHAPTER_EXTRA#(/#PAGE#/) |
| 502 | 502 | return [ |
| 503 | 503 | 'url' => $this->getChapterURL($title_url, $chapter), |
| 504 | - 'number' => ($chapter_parts[1] !== '0' ? "v{$chapter_parts[1]}/" : '') . "c{$chapter_parts[2]}" . (isset($chapter_parts[3]) ? ".{$chapter_parts[3]}" : '')/*)*/ |
|
| 504 | + 'number' => ($chapter_parts[1] !== '0' ? "v{$chapter_parts[1]}/" : '')."c{$chapter_parts[2]}".(isset($chapter_parts[3]) ? ".{$chapter_parts[3]}" : '')/*)*/ |
|
| 505 | 505 | ]; |
| 506 | 506 | } |
| 507 | 507 | public function getChapterURL(string $title_url, string $chapter) : string { |
@@ -683,9 +683,9 @@ discard block |
||
| 683 | 683 | |
| 684 | 684 | $dateString = str_replace('/', '-', trim($nodes_latest->item(0)->nodeValue)); //NOTE: We replace slashes here as it stops strtotime interpreting the date as US date format. |
| 685 | 685 | if($dateString == 'T') { |
| 686 | - $dateString = date("Y-m-d",now()); |
|
| 686 | + $dateString = date("Y-m-d", now()); |
|
| 687 | 687 | } |
| 688 | - $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime($dateString . ' 00:00')); |
|
| 688 | + $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime($dateString.' 00:00')); |
|
| 689 | 689 | |
| 690 | 690 | $titleDataList[$title_url] = $titleData; |
| 691 | 691 | } |
@@ -740,7 +740,7 @@ discard block |
||
| 740 | 740 | //For whatever reason, DOMDocument breaks the <link> element we need to grab the chapter, so we have to grab it elsewhere. |
| 741 | 741 | $titleData['latest_chapter'] = preg_replace('/^.*? - ([0-9\.]+) - .*?$/', '$1', trim($data['nodes_chapter']->textContent)); |
| 742 | 742 | |
| 743 | - $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) $data['nodes_latest']->textContent)); |
|
| 743 | + $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) $data['nodes_latest']->textContent)); |
|
| 744 | 744 | } |
| 745 | 745 | |
| 746 | 746 | return (!empty($titleData) ? $titleData : NULL); |
@@ -842,11 +842,11 @@ discard block |
||
| 842 | 842 | "" |
| 843 | 843 | ); |
| 844 | 844 | if($data) { |
| 845 | - $titleData['title'] = trim(preg_replace('/ Added on .*$/','', $data['nodes_title']->textContent)); |
|
| 845 | + $titleData['title'] = trim(preg_replace('/ Added on .*$/', '', $data['nodes_title']->textContent)); |
|
| 846 | 846 | $titleData['latest_chapter'] = preg_replace('/^.*\/([0-9\.]+)$/', '$1', (string) $data['nodes_chapter']->getAttribute('href')); |
| 847 | 847 | |
| 848 | - $dateString = preg_replace('/^Added (?:on )?/', '',$data['nodes_latest']->textContent); |
|
| 849 | - $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime($dateString)); |
|
| 848 | + $dateString = preg_replace('/^Added (?:on )?/', '', $data['nodes_latest']->textContent); |
|
| 849 | + $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime($dateString)); |
|
| 850 | 850 | } |
| 851 | 851 | return (!empty($titleData) ? $titleData : NULL); |
| 852 | 852 | } |
@@ -48,15 +48,15 @@ discard block |
||
| 48 | 48 | public function __construct() { |
| 49 | 49 | $file_path = APPPATH.'config/monolog.php'; |
| 50 | 50 | $found = FALSE; |
| 51 | - if (file_exists($file_path)) { |
|
| 51 | + if(file_exists($file_path)) { |
|
| 52 | 52 | $found = TRUE; |
| 53 | 53 | require($file_path); |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | // Is the config file in the environment folder? |
| 57 | - if (file_exists($file_path = APPPATH.'config/'.ENVIRONMENT.'/monolog.php')) { |
|
| 57 | + if(file_exists($file_path = APPPATH.'config/'.ENVIRONMENT.'/monolog.php')) { |
|
| 58 | 58 | require($file_path); |
| 59 | - } elseif (!$found) { |
|
| 59 | + } elseif(!$found) { |
|
| 60 | 60 | exit('monolog.php config does not exist'); |
| 61 | 61 | } |
| 62 | 62 | |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | // detect and register all PHP errors in this log hence forth |
| 68 | 68 | ErrorHandler::register($this->log); |
| 69 | 69 | |
| 70 | - if ($this->config['introspection_processor']) |
|
| 70 | + if($this->config['introspection_processor']) |
|
| 71 | 71 | { |
| 72 | 72 | // add controller and line number info to each log message |
| 73 | 73 | // 2 = depth in the stacktrace to ignore. This gives us the file |
@@ -76,9 +76,9 @@ discard block |
||
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | // decide which handler(s) to use |
| 79 | - foreach ($this->config['handlers'] as $value) |
|
| 79 | + foreach($this->config['handlers'] as $value) |
|
| 80 | 80 | { |
| 81 | - switch ($value) |
|
| 81 | + switch($value) |
|
| 82 | 82 | { |
| 83 | 83 | case 'file': |
| 84 | 84 | $handler = new RotatingFileHandler($this->config['file_logfile']); |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | break; |
| 124 | 124 | |
| 125 | 125 | default: |
| 126 | - exit('log handler not supported: ' . $value . "\n"); |
|
| 126 | + exit('log handler not supported: '.$value."\n"); |
|
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | $this->log->pushHandler($handler); |
@@ -145,19 +145,19 @@ discard block |
||
| 145 | 145 | $level = strtoupper($level); |
| 146 | 146 | |
| 147 | 147 | // verify error level |
| 148 | - if (!isset($this->_levels[$level])) |
|
| 148 | + if(!isset($this->_levels[$level])) |
|
| 149 | 149 | { |
| 150 | - $this->log->addError('unknown error level: ' . $level); |
|
| 150 | + $this->log->addError('unknown error level: '.$level); |
|
| 151 | 151 | $level = 'ALL'; |
| 152 | 152 | } |
| 153 | 153 | |
| 154 | 154 | // filter out anything in $this->config['exclusion_list'] |
| 155 | - if (!empty($this->config['exclusion_list'])) |
|
| 155 | + if(!empty($this->config['exclusion_list'])) |
|
| 156 | 156 | { |
| 157 | - foreach ($this->config['exclusion_list'] as $findme) |
|
| 157 | + foreach($this->config['exclusion_list'] as $findme) |
|
| 158 | 158 | { |
| 159 | 159 | $pos = strpos($msg, $findme); |
| 160 | - if ($pos !== false) |
|
| 160 | + if($pos !== false) |
|
| 161 | 161 | { |
| 162 | 162 | // just exit now - we don't want to log this error |
| 163 | 163 | return true; |
@@ -165,9 +165,9 @@ discard block |
||
| 165 | 165 | } |
| 166 | 166 | } |
| 167 | 167 | |
| 168 | - if ($this->_levels[$level] <= $this->config['threshold']) |
|
| 168 | + if($this->_levels[$level] <= $this->config['threshold']) |
|
| 169 | 169 | { |
| 170 | - switch ($level) |
|
| 170 | + switch($level) |
|
| 171 | 171 | { |
| 172 | 172 | case 'ERROR': |
| 173 | 173 | $this->log->addError($msg); |
@@ -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() { |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | $query = $query->get(); |
| 77 | 77 | |
| 78 | 78 | if($query->num_rows() > 0) { |
| 79 | - foreach ($query->result() as $row) { |
|
| 79 | + foreach($query->result() as $row) { |
|
| 80 | 80 | $this->handleUpdate($row); |
| 81 | 81 | } |
| 82 | 82 | } |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | $query = $query->get(); |
| 134 | 134 | |
| 135 | 135 | if($query->num_rows() > 0) { |
| 136 | - foreach ($query->result() as $row) { |
|
| 136 | + foreach($query->result() as $row) { |
|
| 137 | 137 | $this->handleUpdate($row); |
| 138 | 138 | } |
| 139 | 139 | } |
@@ -197,10 +197,10 @@ discard block |
||
| 197 | 197 | ->get(); |
| 198 | 198 | |
| 199 | 199 | $sites = $query->result_array(); |
| 200 | - foreach ($sites as $site) { |
|
| 200 | + foreach($sites as $site) { |
|
| 201 | 201 | $siteClass = $this->sites->{$site['site_class']}; |
| 202 | 202 | if($titleDataList = $siteClass->doCustomUpdate()) { |
| 203 | - foreach ($titleDataList as $titleURL => $titleData) { |
|
| 203 | + foreach($titleDataList as $titleURL => $titleData) { |
|
| 204 | 204 | $titleURL = (string) $titleURL; //Number only keys get converted to int for some reason, so we need to fix that. |
| 205 | 205 | print "> {$titleData['title']} <{$site['site_class']}>"; //Print this prior to doing anything so we can more easily find out if something went wrong |
| 206 | 206 | if(is_array($titleData) && !is_null($titleData['latest_chapter'])) { |
@@ -243,7 +243,7 @@ discard block |
||
| 243 | 243 | $query = $this->db->select('tracker_titles.id, tracker_titles.title_url, tracker_sites.site_class') |
| 244 | 244 | ->from('tracker_titles') |
| 245 | 245 | ->join('tracker_sites', 'tracker_sites.id = tracker_titles.site_id', 'left') |
| 246 | - ->where('tracker_titles.followed','N') |
|
| 246 | + ->where('tracker_titles.followed', 'N') |
|
| 247 | 247 | ->where('tracker_titles !=', '255') |
| 248 | 248 | ->where('tracker_sites.status', 'enabled') |
| 249 | 249 | ->where('tracker_sites.use_custom', 'Y') |
@@ -301,7 +301,7 @@ discard block |
||
| 301 | 301 | // @formatter:on |
| 302 | 302 | |
| 303 | 303 | if($query->num_rows() > 0) { |
| 304 | - foreach ($query->result() as $row) { |
|
| 304 | + foreach($query->result() as $row) { |
|
| 305 | 305 | print "> {$row->title} <{$row->site_class}>"; //Print this prior to doing anything so we can more easily find out if something went wrong |
| 306 | 306 | $titleData = $this->sites->{$row->site_class}->getTitleData($row->title_url); |
| 307 | 307 | if($titleData['title'] && is_array($titleData) && !is_null($titleData['latest_chapter'])) { |
@@ -134,9 +134,9 @@ |
||
| 134 | 134 | $config['composer_autoload'] = FALSE; |
| 135 | 135 | |
| 136 | 136 | //NOTE: This doesn't work in autoload.php as it is loaded after we need it. |
| 137 | -spl_autoload_register(function ($class) { |
|
| 138 | - $fileMono = APPPATH . '../vendor/monolog/monolog/src/'.strtr($class, '\\', '/').'.php'; |
|
| 139 | - $filePsr = APPPATH . '../vendor/psr/log/'.strtr($class, '\\', '/').'.php'; |
|
| 137 | +spl_autoload_register(function($class) { |
|
| 138 | + $fileMono = APPPATH.'../vendor/monolog/monolog/src/'.strtr($class, '\\', '/').'.php'; |
|
| 139 | + $filePsr = APPPATH.'../vendor/psr/log/'.strtr($class, '\\', '/').'.php'; |
|
| 140 | 140 | if(file_exists($fileMono)) { |
| 141 | 141 | require $fileMono; |
| 142 | 142 | return TRUE; |