|
@@ -58,7 +58,7 @@ discard block |
|
|
block discarded – undo |
|
58
|
58
|
|
|
59
|
59
|
//Replace class names |
|
60
|
60
|
$baseFile = str_replace('class HelveticaScans', "class {$this->className}", $baseFile); |
|
61
|
|
- $baseFile = str_replace('coversDefaultClass HelveticaScans', "coversDefaultClass {$this->className}", $baseFile); |
|
|
61
|
+ $baseFile = str_replace('coversDefaultClass HelveticaScans', "coversdefaultclass {$this->className}", $baseFile); |
|
62
|
62
|
|
|
63
|
63
|
//Replace tests |
|
64
|
64
|
$titleList = $this->getTitles(); |
|
@@ -82,7 +82,7 @@ discard block |
|
|
block discarded – undo |
|
82
|
82
|
$baseFile = file_get_contents('./public/userscripts/manga-tracker.user.js'); |
|
83
|
83
|
|
|
84
|
84
|
$parse = parse_url($this->baseURL); |
|
85
|
|
- if(strpos($baseFile, $parse['host']) !== false) die("Domain already exists in userscript?"); |
|
|
85
|
+ if(strpos($baseFile, $parse['host']) !== FALSE) die("Domain already exists in userscript?"); |
|
86
|
86
|
|
|
87
|
87
|
preg_match('/\@updated ([0-9\-]+)\r.*?\@version ([0-9\.]+)/s', $baseFile, $matches); |
|
88
|
88
|
|
|
@@ -113,7 +113,7 @@ discard block |
|
|
block discarded – undo |
|
113
|
113
|
}), |
|
114
|
114
|
|
|
115
|
115
|
//Tracking site |
|
116
|
|
-EOT; |
|
|
116
|
+eot; |
|
117
|
117
|
$baseFile = str_replace(' //Tracking site', $siteData, $baseFile); |
|
118
|
118
|
|
|
119
|
119
|
file_put_contents('./public/userscripts/manga-tracker.user.js', $baseFile); |
|
@@ -146,7 +146,7 @@ discard block |
|
|
block discarded – undo |
|
146
|
146
|
## [{$date}] |
|
147
|
147
|
### Added |
|
148
|
148
|
- Support for {$this->className}. |
|
149
|
|
-EOT; |
|
|
149
|
+eot; |
|
150
|
150
|
$changelogFile = str_replace('All notable changes to this project will be documented in this file.', "All notable changes to this project will be documented in this file.\r\n\r\n{$log}", $changelogFile); |
|
151
|
151
|
} |
|
152
|
152
|
|
|
@@ -158,7 +158,7 @@ discard block |
|
|
block discarded – undo |
|
158
|
158
|
|
|
159
|
159
|
$ch = curl_init("{$this->baseURL}/api/reader/chapters/orderby/desc_created/format/json"); |
|
160
|
160
|
|
|
161
|
|
- curl_setopt($ch, CURLOPT_NOBODY, true); |
|
|
161
|
+ curl_setopt($ch, CURLOPT_NOBODY, TRUE); |
|
162
|
162
|
curl_exec($ch); |
|
163
|
163
|
$status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); |
|
164
|
164
|
curl_close($ch); |
|
@@ -172,7 +172,7 @@ discard block |
|
|
block discarded – undo |
|
172
|
172
|
if($content = file_get_contents($jsonURL)) { |
|
173
|
173
|
$json = json_decode($content, TRUE); |
|
174
|
174
|
shuffle($json['comics']); |
|
175
|
|
- $comics = array_slice($json['comics'], 0, 5, true); |
|
|
175
|
+ $comics = array_slice($json['comics'], 0, 5, TRUE); |
|
176
|
176
|
|
|
177
|
177
|
foreach($comics as $comic) { |
|
178
|
178
|
$titleArr[$comic['stub']] = $comic['name']; |