Skip to content

Commit b4f3440

Browse files
authored
Merge pull request #224 from lbr38/devel
4.15.2
2 parents 9cbedae + 7758831 commit b4f3440

File tree

5 files changed

+14
-20
lines changed

5 files changed

+14
-20
lines changed

www/controllers/Repo/Mirror/Mirror.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -199,15 +199,15 @@ public function download(string $url, string $savePath, int $retries = 0)
199199
*/
200200
if ($currentRetry != $retries) {
201201
$currentRetry++;
202-
$this->logWarning('Curl error (' . curl_errno($this->curlHandle) . '): ' . curl_error($this->curlHandle));
203-
$this->logNote('Retrying (' . $currentRetry . '/' . $retries . ') ...');
202+
$this->taskLogSubStepController->output('Curl error (' . curl_errno($this->curlHandle) . '): ' . curl_error($this->curlHandle), 'warning');
203+
$this->taskLogSubStepController->output('Retrying (' . $currentRetry . '/' . $retries . ') ...', 'note');
204204
continue;
205205
}
206206

207207
/**
208208
* If curl has failed (meaning a curl param might be invalid or timeout has been reached)
209209
*/
210-
$this->logError('Curl error (' . curl_errno($this->curlHandle) . '): ' . curl_error($this->curlHandle), 'Download error');
210+
throw new Exception('Curl error (' . curl_errno($this->curlHandle) . '): ' . curl_error($this->curlHandle));
211211

212212
curl_close($this->curlHandle);
213213
fclose($localFile);
@@ -223,9 +223,9 @@ public function download(string $url, string $savePath, int $retries = 0)
223223
* If return code is 404
224224
*/
225225
if ($status["http_code"] == '404') {
226-
$this->logOutput('File not found (404)' . PHP_EOL);
226+
$this->taskLogSubStepController->output('File not found (404)', 'error');
227227
} else {
228-
$this->logOutput('File could not be downloaded (http return code is: ' . $status["http_code"] . ')' . PHP_EOL);
228+
$this->taskLogSubStepController->output('File could not be downloaded (http return code is: ' . $status["http_code"] . ')', 'error');
229229
}
230230

231231
curl_close($this->curlHandle);

www/controllers/Service/ScheduledTask.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ public function execute()
2929
* Quit if there was an error while loading general settings
3030
*/
3131
if (defined('__LOAD_GENERAL_ERROR') and __LOAD_GENERAL_ERROR > 0) {
32-
// $this->logController->log('error', 'Service', 'Cannot execute scheduled task(s): some general settings are not defined.');
3332
return;
3433
}
3534

@@ -173,7 +172,6 @@ public function sendReminders()
173172
* Quit if there was an error while loading general settings
174173
*/
175174
if (defined('__LOAD_GENERAL_ERROR') and __LOAD_GENERAL_ERROR > 0) {
176-
// $this->logController->log('error', 'Service', 'Cannot execute scheduled task(s): some general settings are not defined.');
177175
return;
178176
}
179177

www/public/assets/favicon.ico

783 Bytes
Binary file not shown.

www/version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.15.1
1+
4.15.2

www/views/includes/containers/tasks/log/substep.inc.php

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,16 @@
3737
$type = $outputDetails['type'];
3838
$message = $outputDetails['message'];
3939

40-
if ($type == 'info') {
41-
echo '<p>' . $message . '</p>';
42-
}
43-
44-
if ($type == 'warning') {
45-
echo '<p>' . $message . '</p>';
46-
}
47-
48-
if ($type == 'error') {
40+
if ($type == 'note') {
41+
echo '<p class="note">' . $message . '</p>';
42+
} else if ($type == 'warning') {
43+
echo '<p class="yellowtext">' . $message . '</p>';
44+
} else if ($type == 'error') {
4945
echo '<p class="redtext">' . $message . '</p>';
50-
}
51-
52-
if ($type == 'pre') {
46+
} else if ($type == 'pre') {
5347
echo '<pre class="codeblock">' . $message . '</pre>';
48+
} else {
49+
echo '<p>' . $message . '</p>';
5450
}
5551
}
5652
}

0 commit comments

Comments
 (0)