Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.15.2 #224

Merged
merged 1 commit into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading