Skip to content

Commit

Permalink
Merge pull request #224 from lbr38/devel
Browse files Browse the repository at this point in the history
4.15.2
  • Loading branch information
lbr38 authored Jan 8, 2025
2 parents 9cbedae + 7758831 commit b4f3440
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 20 deletions.
10 changes: 5 additions & 5 deletions www/controllers/Repo/Mirror/Mirror.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,15 +199,15 @@ public function download(string $url, string $savePath, int $retries = 0)
*/
if ($currentRetry != $retries) {
$currentRetry++;
$this->logWarning('Curl error (' . curl_errno($this->curlHandle) . '): ' . curl_error($this->curlHandle));
$this->logNote('Retrying (' . $currentRetry . '/' . $retries . ') ...');
$this->taskLogSubStepController->output('Curl error (' . curl_errno($this->curlHandle) . '): ' . curl_error($this->curlHandle), 'warning');
$this->taskLogSubStepController->output('Retrying (' . $currentRetry . '/' . $retries . ') ...', 'note');
continue;
}

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

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

curl_close($this->curlHandle);
Expand Down
2 changes: 0 additions & 2 deletions www/controllers/Service/ScheduledTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public function execute()
* Quit if there was an error while loading general settings
*/
if (defined('__LOAD_GENERAL_ERROR') and __LOAD_GENERAL_ERROR > 0) {
// $this->logController->log('error', 'Service', 'Cannot execute scheduled task(s): some general settings are not defined.');
return;
}

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

Expand Down
Binary file modified www/public/assets/favicon.ico
Binary file not shown.
2 changes: 1 addition & 1 deletion www/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.15.1
4.15.2
20 changes: 8 additions & 12 deletions www/views/includes/containers/tasks/log/substep.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,16 @@
$type = $outputDetails['type'];
$message = $outputDetails['message'];

if ($type == 'info') {
echo '<p>' . $message . '</p>';
}

if ($type == 'warning') {
echo '<p>' . $message . '</p>';
}

if ($type == 'error') {
if ($type == 'note') {
echo '<p class="note">' . $message . '</p>';
} else if ($type == 'warning') {
echo '<p class="yellowtext">' . $message . '</p>';
} else if ($type == 'error') {
echo '<p class="redtext">' . $message . '</p>';
}

if ($type == 'pre') {
} else if ($type == 'pre') {
echo '<pre class="codeblock">' . $message . '</pre>';
} else {
echo '<p>' . $message . '</p>';
}
}
}
Expand Down

0 comments on commit b4f3440

Please sign in to comment.