@@ -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 KireiCake extends Base_FoolSlide_Site_Model { |
4 | 4 | public $baseURL = 'https://reader.kireicake.com'; |
@@ -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 SeaOtterScans extends Base_FoolSlide_Site_Model { |
4 | 4 | public $baseURL = 'https://reader.seaotterscans.com'; |
@@ -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 S2Scans extends Base_FoolSlide_Site_Model { |
4 | 4 | public $baseURL = 'https://reader.s2smanga.com'; |
@@ -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 MerakiScans extends Base_FoolSlide_Site_Model { |
4 | 4 | public $baseURL = 'http://www.merakiscans.com/reader'; |
@@ -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 WhiteoutScans extends Base_FoolSlide_Site_Model { |
4 | 4 | public $baseURL = 'https://reader.whiteoutscans.com'; |
@@ -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 DokiFansubs extends Base_FoolSlide_Site_Model { |
4 | 4 | public $baseURL = 'https://kobato.hologfx.com/reader'; |
@@ -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_Sites_Model extends CI_Model { |
4 | 4 | public function __construct() { |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | |
40 | 40 | abstract public function getChapterData(string $title_url, string $chapter) : array; |
41 | 41 | |
42 | - abstract public function getTitleData(string $title_url, bool $firstGet = FALSE) : ?array; |
|
42 | + abstract public function getTitleData(string $title_url, bool $firstGet = FALSE) : ? array; |
|
43 | 43 | |
44 | 44 | final public function isValidTitleURL(string $title_url) : bool { |
45 | 45 | $success = (bool) preg_match($this->titleFormat, $title_url); |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | final protected function get_content(string $url, string $cookie_string = "", string $cookiejar_path = "", bool $follow_redirect = FALSE, bool $isPost = FALSE, array $postFields = []) { |
56 | 56 | $ch = curl_init(); |
57 | 57 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
58 | - curl_setopt($ch, CURLOPT_ENCODING , "gzip"); |
|
58 | + curl_setopt($ch, CURLOPT_ENCODING, "gzip"); |
|
59 | 59 | //curl_setopt($ch, CURLOPT_VERBOSE, 1); |
60 | 60 | curl_setopt($ch, CURLOPT_HEADER, 1); |
61 | 61 | |
@@ -73,8 +73,8 @@ discard block |
||
73 | 73 | curl_setopt($ch, CURLOPT_URL, $url); |
74 | 74 | |
75 | 75 | if($isPost) { |
76 | - curl_setopt($ch,CURLOPT_POST, count($postFields)); |
|
77 | - curl_setopt($ch,CURLOPT_POSTFIELDS, http_build_query($postFields)); |
|
76 | + curl_setopt($ch, CURLOPT_POST, count($postFields)); |
|
77 | + curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postFields)); |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | $response = curl_exec($ch); |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | |
131 | 131 | $dom = new DOMDocument(); |
132 | 132 | libxml_use_internal_errors(TRUE); |
133 | - $dom->loadHTML('<?xml encoding="utf-8" ?>' . $data); |
|
133 | + $dom->loadHTML('<?xml encoding="utf-8" ?>'.$data); |
|
134 | 134 | libxml_use_internal_errors(FALSE); |
135 | 135 | |
136 | 136 | $xpath = new DOMXPath($dom); |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | $nodes_row = $xpath->query($node_row_string); |
139 | 139 | if($nodes_title->length === 1 && $nodes_row->length === 1) { |
140 | 140 | $firstRow = $nodes_row->item(0); |
141 | - $nodes_latest = $xpath->query($node_latest_string, $firstRow); |
|
141 | + $nodes_latest = $xpath->query($node_latest_string, $firstRow); |
|
142 | 142 | |
143 | 143 | if($node_chapter_string !== '') { |
144 | 144 | $nodes_chapter = $xpath->query($node_chapter_string, $firstRow); |
@@ -266,11 +266,11 @@ discard block |
||
266 | 266 | $chapter_parts = explode('/', $chapter); //returns #LANG#/#VOLUME#/#CHAPTER#/#CHAPTER_EXTRA#(/#PAGE#/) |
267 | 267 | return [ |
268 | 268 | 'url' => "{$this->baseURL}/read/{$title_url}/{$chapter}/", |
269 | - 'number' => ($chapter_parts[1] !== '0' ? "v{$chapter_parts[1]}/" : '') . "c{$chapter_parts[2]}" . (isset($chapter_parts[3]) ? ".{$chapter_parts[3]}" : '')/*)*/ |
|
269 | + 'number' => ($chapter_parts[1] !== '0' ? "v{$chapter_parts[1]}/" : '')."c{$chapter_parts[2]}".(isset($chapter_parts[3]) ? ".{$chapter_parts[3]}" : '')/*)*/ |
|
270 | 270 | ]; |
271 | 271 | } |
272 | 272 | |
273 | - public function getTitleData(string $title_url, bool $firstGet = FALSE) : ?array { |
|
273 | + public function getTitleData(string $title_url, bool $firstGet = FALSE) : ? array { |
|
274 | 274 | $titleData = []; |
275 | 275 | |
276 | 276 | $jsonURL = "{$this->baseURL}/api/reader/comic/stub/{$title_url}/format/json"; |
@@ -1,10 +1,10 @@ |
||
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 JaiminisBox extends Base_FoolSlide_Site_Model { |
4 | 4 | public $baseURL = 'https://jaiminisbox.com/reader'; |
5 | 5 | |
6 | 6 | //NOTE: Jaimini's Box appears to have disabled API support for some reason. Fallback to using the old method. |
7 | - public function getTitleData(string $title_url, bool $firstGet = FALSE) : ?array { |
|
7 | + public function getTitleData(string $title_url, bool $firstGet = FALSE) : ? array { |
|
8 | 8 | $fullURL = $this->getFullTitleURL($title_url); |
9 | 9 | $titleData = []; |
10 | 10 | if($content = $this->get_content($fullURL, "", "", FALSE, TRUE, ['adult' => 'true'])) { |
@@ -16,12 +16,12 @@ discard block |
||
16 | 16 | $this->header_data['page'] = "forgot_password"; |
17 | 17 | |
18 | 18 | //TODO (RESEARCH): Should we allow username here too? |
19 | - $this->form_validation->set_rules('email', 'Email', 'required|valid_email', array( |
|
19 | + $this->form_validation->set_rules('email', 'Email', 'required|valid_email', array( |
|
20 | 20 | 'required' => 'Please enter your email.', |
21 | 21 | 'valid_email' => 'The email your entered is invalid.' |
22 | 22 | )); |
23 | 23 | |
24 | - if ($this->form_validation->run() === TRUE) { |
|
24 | + if($this->form_validation->run() === TRUE) { |
|
25 | 25 | //form is valid |
26 | 26 | |
27 | 27 | $identity = $this->ion_auth->where('email', $this->input->post('email'))->users()->row(); |
@@ -71,21 +71,21 @@ discard block |
||
71 | 71 | $this->header_data['page'] = "reset-password"; |
72 | 72 | |
73 | 73 | $user = $this->ion_auth->forgotten_password_check($code); |
74 | - if ($user) { |
|
74 | + if($user) { |
|
75 | 75 | //code is valid, show reset form or process reset |
76 | 76 | $min_password_length = $this->config->item('min_password_length', 'ion_auth'); |
77 | 77 | $max_password_length = $this->config->item('max_password_length', 'ion_auth'); |
78 | - $this->form_validation->set_rules('new_password', "Password", 'required|min_length['.$min_password_length.']|max_length['.$max_password_length.']'); |
|
78 | + $this->form_validation->set_rules('new_password', "Password", 'required|min_length['.$min_password_length.']|max_length['.$max_password_length.']'); |
|
79 | 79 | $this->form_validation->set_rules('new_password_confirm', "Password Confirm", 'required|matches[new_password]'); |
80 | 80 | |
81 | - if ($this->form_validation->run() === TRUE) { |
|
81 | + if($this->form_validation->run() === TRUE) { |
|
82 | 82 | //form is valid, process the password reset request |
83 | 83 | //TODO (Research): The original ion_auth auth.php sent the userid to the form, then matched it on return, is there any point to this? |
84 | 84 | |
85 | 85 | $identity = $user->{'email'}; |
86 | 86 | $change = $this->ion_auth->reset_password($identity, $this->input->post('new_password')); |
87 | 87 | |
88 | - if ($change) { |
|
88 | + if($change) { |
|
89 | 89 | //password changed successfully, redirect to login |
90 | 90 | $this->session->set_flashdata('notices', $this->ion_auth->messages()); |
91 | 91 | redirect("user/login", 'refresh'); |