@@ -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 WebToons extends Base_Site_Model { |
4 | 4 | /* Webtoons.com has a very weird and pointless URL format. |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | ]; |
35 | 35 | } |
36 | 36 | |
37 | - public function getTitleData(string $title_url, bool $firstGet = FALSE) : ?array { |
|
37 | + public function getTitleData(string $title_url, bool $firstGet = FALSE) : ? array { |
|
38 | 38 | $titleData = []; |
39 | 39 | |
40 | 40 | //FIXME: We don't use parseTitleDOM here due to using rss. Should probably have an alternate method for XML parsing. |
@@ -52,8 +52,8 @@ discard block |
||
52 | 52 | $titleData['title'] = trim((string) $xml->{'channel'}->title); |
53 | 53 | |
54 | 54 | $chapterURLSegments = explode('/', ((string) $xml->{'channel'}->item[0]->link)); |
55 | - $titleData['latest_chapter'] = preg_replace('/^.*?([0-9]+)$/', '$1', $chapterURLSegments[7]) . ':--:' . $chapterURLSegments[6]; |
|
56 | - $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) $xml->{'channel'}->item[0]->pubDate)); |
|
55 | + $titleData['latest_chapter'] = preg_replace('/^.*?([0-9]+)$/', '$1', $chapterURLSegments[7]).':--:'.$chapterURLSegments[6]; |
|
56 | + $titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) $xml->{'channel'}->item[0]->pubDate)); |
|
57 | 57 | |
58 | 58 | if($firstGet) { |
59 | 59 | $titleData = array_merge($titleData, $this->doCustomFollow($content['body'], ['id' => $title_parts[0]])); |
@@ -45,7 +45,8 @@ |
||
45 | 45 | |
46 | 46 | $content = $this->get_content($fullURL); |
47 | 47 | $data = $content['body']; |
48 | - if($data !== 'Can\'t find the manga series.') { //FIXME: We should check for he proper error here. |
|
48 | + if($data !== 'Can\'t find the manga series.') { |
|
49 | +//FIXME: We should check for he proper error here. |
|
49 | 50 | $xml = simplexml_load_string($data); |
50 | 51 | if($xml) { |
51 | 52 | if(isset($xml->{'channel'}->item[0])) { |
@@ -78,7 +78,7 @@ |
||
78 | 78 | //TEMP |
79 | 79 | $route['user/dashboard_beta'] = 'User/DashboardBeta'; |
80 | 80 | |
81 | -$route['api/internal/get_list'] = 'API/Internal/GetList'; |
|
81 | +$route['api/internal/get_list'] = 'API/Internal/GetList'; |
|
82 | 82 | $route['api/internal/get_list/(all|reading|on-hold|plan-to-read|(custom(?:1|2|3)))'] = 'API/Internal/GetList/index/$1'; |
83 | 83 | |
84 | 84 | $route['ajax/username_check']['post'] = 'Ajax/UsernameCheck'; //rate limited |