@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | protected $footer_data = array(); |
7 | 7 | public $global_data = array(); |
8 | 8 | |
9 | - public function __construct(){ |
|
9 | + public function __construct() { |
|
10 | 10 | parent::__construct(); |
11 | 11 | |
12 | 12 | //FIXME: This is pretty much a phpUnit hack. Without it phpUnit fails here. We need a proper way to fake user/admin testing. |
@@ -17,13 +17,13 @@ discard block |
||
17 | 17 | |
18 | 18 | $this->global_data['theme'] = $this->User_Options->get('theme'); |
19 | 19 | if(ENVIRONMENT === 'production') { |
20 | - $this->global_data['compiled_css_path'] = function () { |
|
20 | + $this->global_data['compiled_css_path'] = function() { |
|
21 | 21 | $css_path = "css/main.{$this->global_data['theme']}"; |
22 | - return asset_url() . $css_path . '.' . filemtime(APPPATH . "../public/assets/{$css_path}.css") . '.css'; |
|
22 | + return asset_url().$css_path.'.'.filemtime(APPPATH."../public/assets/{$css_path}.css").'.css'; |
|
23 | 23 | }; |
24 | 24 | |
25 | 25 | $js_path = 'js/compiled.min'; |
26 | - $this->global_data['compiled_js_path'] = asset_url() . $js_path . '.' . filemtime(APPPATH . "../public/assets/{$js_path}.js") . '.js'; |
|
26 | + $this->global_data['compiled_js_path'] = asset_url().$js_path.'.'.filemtime(APPPATH."../public/assets/{$js_path}.js").'.js'; |
|
27 | 27 | } |
28 | 28 | } |
29 | 29 | |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | $json = is_array($json_input) ? json_encode($json_input) : $json_input; |
55 | 55 | |
56 | 56 | $this->output->set_content_type('application/json', 'utf-8'); |
57 | - $this->_render_content($json ?? '{}','json', $download, $filenamePrefix); |
|
57 | + $this->_render_content($json ?? '{}', 'json', $download, $filenamePrefix); |
|
58 | 58 | } |
59 | 59 | public function _render_content(string $content, string $filenameExt, bool $download = FALSE, string $filenamePrefix = 'tracker') : void { |
60 | 60 | if($download) { |
@@ -40,6 +40,6 @@ |
||
40 | 40 | |
41 | 41 | $config['dsn'] = TRUE; |
42 | 42 | |
43 | -if(file_exists(APPPATH . 'config/_secure/email.php')) { |
|
44 | - include APPPATH . 'config/_secure/email.php'; //CI BUG: For some odd reason, this isn't picked up by MY_Config. Possibly due to MY_Config not being loaded yet? |
|
43 | +if(file_exists(APPPATH.'config/_secure/email.php')) { |
|
44 | + include APPPATH.'config/_secure/email.php'; //CI BUG: For some odd reason, this isn't picked up by MY_Config. Possibly due to MY_Config not being loaded yet? |
|
45 | 45 | } |
@@ -38,10 +38,10 @@ discard block |
||
38 | 38 | imagealphablending($sheetImage, FALSE); |
39 | 39 | imagesavealpha($sheetImage, TRUE); |
40 | 40 | |
41 | - imagefill($sheetImage,0,0,0x7fff0000); |
|
41 | + imagefill($sheetImage, 0, 0, 0x7fff0000); |
|
42 | 42 | |
43 | 43 | $x = 0; |
44 | - foreach ($this->fileList as $filename) { |
|
44 | + foreach($this->fileList as $filename) { |
|
45 | 45 | $iconImage = imagecreatefrompng("{$this->iconFolder}/{$filename}"); |
46 | 46 | imagealphablending($iconImage, TRUE); |
47 | 47 | |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | $x++; |
53 | 53 | } |
54 | 54 | |
55 | - imagepng($sheetImage, ASSET_FOLDER . "/img/{$this->type}s.png"); |
|
55 | + imagepng($sheetImage, ASSET_FOLDER."/img/{$this->type}s.png"); |
|
56 | 56 | say('Updated spritesheet!'); |
57 | 57 | } |
58 | 58 | private function generateLESS(string $filename, int $dst_x) : void { |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | " .sprite();\n". |
79 | 79 | " background: url('../../img/{$this->type}s.@{cache-version}.png') no-repeat;\n\n". |
80 | 80 | " {$newIconLESS}\n". |
81 | - "} //end sprite-{$this->type}",$oldLESS); |
|
81 | + "} //end sprite-{$this->type}", $oldLESS); |
|
82 | 82 | |
83 | 83 | file_put_contents($icons_file, $newLESS); |
84 | 84 | say('Updated LESS!'); |
@@ -14,8 +14,8 @@ discard block |
||
14 | 14 | tf.chapter, tf.page, 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))) |
@@ -57,8 +57,8 @@ discard block |
||
57 | 57 | tf.chapter, tf.page, tf.updated_at', FALSE) |
58 | 58 | ->from('tracker_favourites AS tf') |
59 | 59 | ->join('tracker_chapters AS tc', 'tf.chapter_id = tc.id', 'left') |
60 | - ->join('tracker_titles AS tt', 'tc.title_id = tt.id', 'left') |
|
61 | - ->join('tracker_sites AS ts', 'tt.site_id = ts.id', 'left') |
|
60 | + ->join('tracker_titles AS tt', 'tc.title_id = tt.id', 'left') |
|
61 | + ->join('tracker_sites AS ts', 'tt.site_id = ts.id', 'left') |
|
62 | 62 | ->where('tc.user_id', $this->User->id) //CHECK: Is this inefficient? Would it be better to have a user_id column in tracker_favourites? |
63 | 63 | ->order_by('tf.id DESC') |
64 | 64 | ->get(); |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | |
146 | 146 | if($isSuccess) { |
147 | 147 | $success = array( |
148 | - 'status' => 'Unfavourited' . ($page ? " page {$page}" : ''), |
|
148 | + 'status' => 'Unfavourited'.($page ? " page {$page}" : ''), |
|
149 | 149 | 'bool' => TRUE |
150 | 150 | ); |
151 | 151 | $this->History->userRemoveFavourite((int) $idCQueryRow->id, $chapter); |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | |
168 | 168 | if($isSuccess) { |
169 | 169 | $success = array( |
170 | - 'status' => 'Favourited' . ($page ? " page {$page}" : ''), |
|
170 | + 'status' => 'Favourited'.($page ? " page {$page}" : ''), |
|
171 | 171 | 'bool' => TRUE |
172 | 172 | ); |
173 | 173 | $this->History->userAddFavourite((int) $idCQueryRow->id, $chapter); |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | // Maintenance Mode |
40 | 40 | define('MAINTENANCE', FALSE); |
41 | 41 | if(MAINTENANCE && PHP_SAPI !== 'cli') { |
42 | - require_once __DIR__ . DIRECTORY_SEPARATOR . '../application/views/common/maintenance.php'; ## call view |
|
42 | + require_once __DIR__.DIRECTORY_SEPARATOR.'../application/views/common/maintenance.php'; ## call view |
|
43 | 43 | exit(); |
44 | 44 | } |
45 | 45 | |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | * Different environments will require different levels of error reporting. |
82 | 82 | * By default development will show errors but testing and live will hide them. |
83 | 83 | */ |
84 | -switch (ENVIRONMENT) |
|
84 | +switch(ENVIRONMENT) |
|
85 | 85 | { |
86 | 86 | case 'development': |
87 | 87 | error_reporting(-1); |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | case 'testing': |
95 | 95 | case 'production': |
96 | 96 | ini_set('display_errors', 0); |
97 | - if (version_compare(PHP_VERSION, '5.3', '>=')) |
|
97 | + if(version_compare(PHP_VERSION, '5.3', '>=')) |
|
98 | 98 | { |
99 | 99 | error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED); |
100 | 100 | } |
@@ -212,12 +212,12 @@ discard block |
||
212 | 212 | */ |
213 | 213 | |
214 | 214 | // Set the current directory correctly for CLI requests |
215 | -if (defined('STDIN')) |
|
215 | +if(defined('STDIN')) |
|
216 | 216 | { |
217 | 217 | chdir(dirname(__FILE__)); |
218 | 218 | } |
219 | 219 | |
220 | -if (($_temp = realpath($system_path)) !== FALSE) |
|
220 | +if(($_temp = realpath($system_path)) !== FALSE) |
|
221 | 221 | { |
222 | 222 | $system_path = $_temp.DIRECTORY_SEPARATOR; |
223 | 223 | } |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | } |
233 | 233 | |
234 | 234 | // Is the system path correct? |
235 | -if ( ! is_dir($system_path)) |
|
235 | +if(!is_dir($system_path)) |
|
236 | 236 | { |
237 | 237 | header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); |
238 | 238 | echo 'Your system folder path does not appear to be set correctly. Please open the following file and correct this: '.pathinfo(__FILE__, PATHINFO_BASENAME); |
@@ -257,9 +257,9 @@ discard block |
||
257 | 257 | define('SYSDIR', basename(BASEPATH)); |
258 | 258 | |
259 | 259 | // The path to the "application" directory |
260 | -if (is_dir($application_folder)) |
|
260 | +if(is_dir($application_folder)) |
|
261 | 261 | { |
262 | - if (($_temp = realpath($application_folder)) !== FALSE) |
|
262 | + if(($_temp = realpath($application_folder)) !== FALSE) |
|
263 | 263 | { |
264 | 264 | $application_folder = $_temp; |
265 | 265 | } |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | ); |
273 | 273 | } |
274 | 274 | } |
275 | -elseif (is_dir(BASEPATH.$application_folder.DIRECTORY_SEPARATOR)) |
|
275 | +elseif(is_dir(BASEPATH.$application_folder.DIRECTORY_SEPARATOR)) |
|
276 | 276 | { |
277 | 277 | $application_folder = BASEPATH.strtr( |
278 | 278 | trim($application_folder, '/\\'), |
@@ -290,13 +290,13 @@ discard block |
||
290 | 290 | define('APPPATH', $application_folder.DIRECTORY_SEPARATOR); |
291 | 291 | |
292 | 292 | // The path to the "views" directory |
293 | -if ( ! isset($view_folder[0]) && is_dir(APPPATH.'views'.DIRECTORY_SEPARATOR)) |
|
293 | +if(!isset($view_folder[0]) && is_dir(APPPATH.'views'.DIRECTORY_SEPARATOR)) |
|
294 | 294 | { |
295 | 295 | $view_folder = APPPATH.'views'; |
296 | 296 | } |
297 | -elseif (is_dir($view_folder)) |
|
297 | +elseif(is_dir($view_folder)) |
|
298 | 298 | { |
299 | - if (($_temp = realpath($view_folder)) !== FALSE) |
|
299 | + if(($_temp = realpath($view_folder)) !== FALSE) |
|
300 | 300 | { |
301 | 301 | $view_folder = $_temp; |
302 | 302 | } |
@@ -309,7 +309,7 @@ discard block |
||
309 | 309 | ); |
310 | 310 | } |
311 | 311 | } |
312 | -elseif (is_dir(APPPATH.$view_folder.DIRECTORY_SEPARATOR)) |
|
312 | +elseif(is_dir(APPPATH.$view_folder.DIRECTORY_SEPARATOR)) |
|
313 | 313 | { |
314 | 314 | $view_folder = APPPATH.strtr( |
315 | 315 | trim($view_folder, '/\\'), |
@@ -106,15 +106,15 @@ discard block |
||
106 | 106 | )'); |
107 | 107 | }); |
108 | 108 | |
109 | -task('deploy:copy_files', function () { |
|
109 | +task('deploy:copy_files', function() { |
|
110 | 110 | $sharedPath = '{{deploy_path}}/shared'; |
111 | - foreach (get('copy_files') as $file) { |
|
111 | + foreach(get('copy_files') as $file) { |
|
112 | 112 | $dirname = dirname(parse($file)); |
113 | 113 | // Create dir of shared file |
114 | - run("mkdir -p $sharedPath/" . $dirname); |
|
114 | + run("mkdir -p $sharedPath/".$dirname); |
|
115 | 115 | // Check if shared file does not exist in shared. |
116 | 116 | // and file exist in release |
117 | - if (!test("[ -f $sharedPath/$file ]") && test("[ -f {{release_path}}/$file ]")) { |
|
117 | + if(!test("[ -f $sharedPath/$file ]") && test("[ -f {{release_path}}/$file ]")) { |
|
118 | 118 | // Copy file in shared dir if not present |
119 | 119 | run("cp -rv {{release_path}}/$file $sharedPath/$file"); |
120 | 120 | } |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | } |
130 | 130 | }); |
131 | 131 | |
132 | -task('deploy:migrate_db', function () { |
|
132 | +task('deploy:migrate_db', function() { |
|
133 | 133 | // Migration is disabled by default on production, so we need to toggle it temporally. |
134 | 134 | run('( \ |
135 | 135 | cd {{release_path}} && \ |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | )'); |
140 | 140 | }); |
141 | 141 | |
142 | -task('deploy:maintenance_enable', function () { |
|
142 | +task('deploy:maintenance_enable', function() { |
|
143 | 143 | //define('MAINTENANCE', FALSE); |
144 | 144 | run('( \ |
145 | 145 | cd {{previous_release}} && \ |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | sed -i -r "s/(\'MAINTENANCE\',) FALSE/\1 TRUE/" public/index.php \ |
151 | 151 | )'); |
152 | 152 | }); |
153 | -task('deploy:maintenance_disable', function () { |
|
153 | +task('deploy:maintenance_disable', function() { |
|
154 | 154 | //define('MAINTENANCE', FALSE); |
155 | 155 | run('( \ |
156 | 156 | cd {{release_path}} && \ |
@@ -10,7 +10,7 @@ |
||
10 | 10 | <?=form_input($form_url)?> |
11 | 11 | </div> |
12 | 12 | |
13 | - <?=form_input('website','', ['id' => 'website'])?> |
|
13 | + <?=form_input('website', '', ['id' => 'website'])?> |
|
14 | 14 | |
15 | 15 | <?=validation_errors()?><?=($issue_submitted ? 'Issue successfully submitted' : "")?> |
16 | 16 | <button type="submit" class="btn btn-primary">Submit</button> | Alternatively, post an issue on our <?=anchor('https://github.com/DakuTree/manga-tracker/issues/new', 'Github page')?>. |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | $this->header_data['page'] = 'report-issue'; |
13 | 13 | |
14 | 14 | $this->form_validation->set_rules('issue_description', 'Description', 'required|max_length[1000]'); |
15 | - $this->form_validation->set_rules('issue_url', 'URL', 'valid_url'); |
|
15 | + $this->form_validation->set_rules('issue_url', 'URL', 'valid_url'); |
|
16 | 16 | |
17 | 17 | |
18 | 18 | $this->body_data['issue_submitted'] = FALSE; |
@@ -21,9 +21,9 @@ discard block |
||
21 | 21 | |
22 | 22 | if(!empty($this->input->post('website'))) { |
23 | 23 | $this->body_data['issue_submitted'] = FALSE; |
24 | - log_message('error', 'Bot attempting to spam report issue form: "' . $this->input->post('issue_description') . '"'); |
|
24 | + log_message('error', 'Bot attempting to spam report issue form: "'.$this->input->post('issue_description').'"'); |
|
25 | 25 | } else { |
26 | - $this->body_data['issue_submitted'] = $this->Tracker->issue->report('USERID:' . $this->User->id . ' ||| ' . $this->input->post('issue_description'), NULL, $this->input->post('issue_url')); |
|
26 | + $this->body_data['issue_submitted'] = $this->Tracker->issue->report('USERID:'.$this->User->id.' ||| '.$this->input->post('issue_description'), NULL, $this->input->post('issue_url')); |
|
27 | 27 | } |
28 | 28 | } |
29 | 29 |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | //We don't want double trailing slashes, so fix this when possible. |
119 | 119 | $pageSeparator = ''; |
120 | 120 | } |
121 | - $pageURL = $chapterData['url'] . $pageSeparator . $page; |
|
121 | + $pageURL = $chapterData['url'].$pageSeparator.$page; |
|
122 | 122 | } |
123 | 123 | return $pageURL; |
124 | 124 | } |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | |
213 | 213 | $ch = curl_init(); |
214 | 214 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
215 | - curl_setopt($ch, CURLOPT_ENCODING , "gzip"); |
|
215 | + curl_setopt($ch, CURLOPT_ENCODING, "gzip"); |
|
216 | 216 | //curl_setopt($ch, CURLOPT_VERBOSE, 1); |
217 | 217 | curl_setopt($ch, CURLOPT_HEADER, 1); |
218 | 218 | |
@@ -234,8 +234,8 @@ discard block |
||
234 | 234 | curl_setopt($ch, CURLOPT_URL, $url); |
235 | 235 | |
236 | 236 | if($isPost) { |
237 | - curl_setopt($ch,CURLOPT_POST, count($postFields)); |
|
238 | - curl_setopt($ch,CURLOPT_POSTFIELDS, http_build_query($postFields)); |
|
237 | + curl_setopt($ch, CURLOPT_POST, count($postFields)); |
|
238 | + curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postFields)); |
|
239 | 239 | } |
240 | 240 | |
241 | 241 | $response = curl_exec($ch); |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | $result = shell_exec('python '.APPPATH.'../_scripts/get_cloudflare_cookie.py '.escapeshellarg(json_encode($urlData))); |
283 | 283 | $cookieData = json_decode($result, TRUE); |
284 | 284 | |
285 | - $this->cache->save("cloudflare_{$this->site}", $cookieData['cookies'], 31536000 /* 1 year, or until we renew it */); |
|
285 | + $this->cache->save("cloudflare_{$this->site}", $cookieData['cookies'], 31536000 /* 1 year, or until we renew it */); |
|
286 | 286 | log_message('debug', "Saving CloudFlare Cookies for {$this->site}"); |
287 | 287 | |
288 | 288 | $refresh = TRUE; |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | |
341 | 341 | $dom = new DOMDocument(); |
342 | 342 | libxml_use_internal_errors(TRUE); |
343 | - $dom->loadHTML('<?xml encoding="utf-8" ?>' . $data); |
|
343 | + $dom->loadHTML('<?xml encoding="utf-8" ?>'.$data); |
|
344 | 344 | libxml_use_internal_errors(FALSE); |
345 | 345 | |
346 | 346 | $xpath = new DOMXPath($dom); |
@@ -349,7 +349,7 @@ discard block |
||
349 | 349 | if($nodes_title->length === 1) { |
350 | 350 | if($nodes_row->length === 1) { |
351 | 351 | $firstRow = $nodes_row->item(0); |
352 | - $nodes_latest = $xpath->query($node_latest_string, $firstRow); |
|
352 | + $nodes_latest = $xpath->query($node_latest_string, $firstRow); |
|
353 | 353 | |
354 | 354 | if($node_chapter_string !== '') { |
355 | 355 | $nodes_chapter = $xpath->query($node_chapter_string, $firstRow); |
@@ -565,7 +565,7 @@ discard block |
||
565 | 565 | final private function _setSiteRateLimit(?int $rateLimit = NULL) : bool { |
566 | 566 | //We would just use increment(), but we can't set ttl with it... |
567 | 567 | $currentRateLimit = $rateLimit ?: $this->_getSiteRateLimit(); |
568 | - return $this->cache->save("{$this->site}_ratelimit", $currentRateLimit + 1,3600); |
|
568 | + return $this->cache->save("{$this->site}_ratelimit", $currentRateLimit + 1, 3600); |
|
569 | 569 | } |
570 | 570 | } |
571 | 571 | |
@@ -583,7 +583,7 @@ discard block |
||
583 | 583 | $chapter_parts = explode('/', $chapter); //returns #LANG#/#VOLUME#/#CHAPTER#/#CHAPTER_EXTRA#(/#PAGE#/) |
584 | 584 | return [ |
585 | 585 | 'url' => $this->getChapterURL($title_url, $chapter), |
586 | - 'number' => ($chapter_parts[1] !== '0' ? "v{$chapter_parts[1]}/" : '') . "c{$chapter_parts[2]}" . (isset($chapter_parts[3]) ? ".{$chapter_parts[3]}" : '')/*)*/ |
|
586 | + 'number' => ($chapter_parts[1] !== '0' ? "v{$chapter_parts[1]}/" : '')."c{$chapter_parts[2]}".(isset($chapter_parts[3]) ? ".{$chapter_parts[3]}" : '')/*)*/ |
|
587 | 587 | ]; |
588 | 588 | } |
589 | 589 | public function getChapterURL(string $title_url, string $chapter) : string { |
@@ -768,9 +768,9 @@ discard block |
||
768 | 768 | |
769 | 769 | $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. |
770 | 770 | if($dateString == 'T') { |
771 | - $dateString = date("Y-m-d",now()); |
|
771 | + $dateString = date("Y-m-d", now()); |
|
772 | 772 | } |
773 | - $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime($dateString . ' 00:00')); |
|
773 | + $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime($dateString.' 00:00')); |
|
774 | 774 | |
775 | 775 | $titleDataList[$title_url] = $titleData; |
776 | 776 | } |
@@ -935,11 +935,11 @@ discard block |
||
935 | 935 | "" |
936 | 936 | ); |
937 | 937 | if($data) { |
938 | - $titleData['title'] = trim(preg_replace('/ Added on .*$/','', $data['nodes_title']->textContent)); |
|
938 | + $titleData['title'] = trim(preg_replace('/ Added on .*$/', '', $data['nodes_title']->textContent)); |
|
939 | 939 | $titleData['latest_chapter'] = preg_replace('/^.*\/([0-9\.]+)$/', '$1', (string) $data['nodes_chapter']->getAttribute('href')); |
940 | 940 | |
941 | - $dateString = preg_replace('/^Added (?:on )?/', '',$data['nodes_latest']->textContent); |
|
942 | - $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime($dateString)); |
|
941 | + $dateString = preg_replace('/^Added (?:on )?/', '', $data['nodes_latest']->textContent); |
|
942 | + $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime($dateString)); |
|
943 | 943 | } |
944 | 944 | return (!empty($titleData) ? $titleData : NULL); |
945 | 945 | } |
@@ -1017,9 +1017,9 @@ discard block |
||
1017 | 1017 | public function getChapterData(string $title_url, string $chapter) : array { |
1018 | 1018 | if(strpos($chapter, '/')) { |
1019 | 1019 | $chapterArr = explode('/', $chapter); |
1020 | - $chapterN = "v{$chapterArr[0]}/c".str_replace('chapter_','',$chapterArr[1]); |
|
1021 | - } else if (ctype_digit($chapter)) { |
|
1022 | - $chapterN = 'c'.str_replace('chapter_','', $chapter); |
|
1020 | + $chapterN = "v{$chapterArr[0]}/c".str_replace('chapter_', '', $chapterArr[1]); |
|
1021 | + } else if(ctype_digit($chapter)) { |
|
1022 | + $chapterN = 'c'.str_replace('chapter_', '', $chapter); |
|
1023 | 1023 | } |
1024 | 1024 | return [ |
1025 | 1025 | 'url' => $this->getChapterURL($title_url, $chapter), |