From 77588317f9335a7bbc13c1f6755c5ae55e03ef4b Mon Sep 17 00:00:00 2001 From: Ludovic <54670129+lbr38@users.noreply.github.com> Date: Wed, 8 Jan 2025 08:10:22 +0100 Subject: [PATCH] 4.15.2 --- www/controllers/Repo/Mirror/Mirror.php | 10 ++++----- www/controllers/Service/ScheduledTask.php | 2 -- www/public/assets/favicon.ico | Bin 3821 -> 4604 bytes www/version | 2 +- .../containers/tasks/log/substep.inc.php | 20 +++++++----------- 5 files changed, 14 insertions(+), 20 deletions(-) diff --git a/www/controllers/Repo/Mirror/Mirror.php b/www/controllers/Repo/Mirror/Mirror.php index c2e46a0e..3d5334c8 100644 --- a/www/controllers/Repo/Mirror/Mirror.php +++ b/www/controllers/Repo/Mirror/Mirror.php @@ -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); @@ -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); diff --git a/www/controllers/Service/ScheduledTask.php b/www/controllers/Service/ScheduledTask.php index ce10fb89..3bb9bcac 100644 --- a/www/controllers/Service/ScheduledTask.php +++ b/www/controllers/Service/ScheduledTask.php @@ -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; } @@ -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; } diff --git a/www/public/assets/favicon.ico b/www/public/assets/favicon.ico index b10b007f2ed104716de8143988c3127231be3a41..8d1d1185812ae1eeaebcd0dedc5efa37ed4f2d46 100644 GIT binary patch literal 4604 zcmcI{c{G%5`2RCwXoTz}WZ%NHm{D0LODKk-BoW0JW>Aft7)vNBdm70avNwv1y_y6~NpE+~pzV7R~KiB7TUH5&Sxd8wIe%KELkOdfm03ZgA z@7rL^`1T*#4-WY(%uOz`z3eZX3;elurv%HkeD7fFAYJ)^WB?G%wJGbi1oQG`q$y=joE=uBYPk^PT$8k*2lLPR)I9 z&X|y2JjRw_3$a=>1bGJ)=k=&B>^w0Z+lV!zeIN^x<+8Vf^>Dy+^eET12Xd^>vj2Nw zu%(vcN-Xv{HWKR^zq3?N9zY%SI^6R;_q58#cZJnLCjh1{)0^Z|eA_zqigE1vho1)IMXavZCi6r?Idevx1_P#sjinTI+Ona5O{YlEqfAJ+TU# z&$t;6^3@vAu)Tjgwgwdtf*p*Zz|1jk=o*pl^?D zuBmT}(D0KoTWw4NO%=-lRPb%1kSe(68D6f2Vg~uAuW9iL0;_~^N6jW*R`LSJOGE;) z&a1gZf&>FH^jS{^62EOL_x1TtSkaCetH{?tNXlcI1x5>c=Vv=>$il`;PDv z3`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ef$fAP?d=HvIt5Nxnj<1tiOAi~x#pxX zr6%PXAfHCKBwvP26HFI|6n?Xa+#w>PopU3dbGKEv@Vy4eq5dMWt%xkzSp{ zB=afI1o+XW9aC$M7r&(*yKh{L2bAKGhxDhIa*fHwi2s##lj4GpBYXF}I@EX9RCcOsmp1ltPeICF&fj$r5 zO@Pk>cqh<<#cO~R3zcfr03HD8cLKY66HsL)K*#Is4%{jtj|cr+ortt}p{7UuYrEVd zMdS<-8P&m$udfr4xBW++d<~%8(@z$W(A~Ib>#zolQDiOI-M0Rq{9p#++sJ(@D({9_1q?7i{ zbLQRw9l@7WfZzuKSL;aHsPvwW(CuMaxR1{6{jdrEuvH}iKwH%xh;2-K8}NjV$EhvE zW;y{!>xj9w6aZka2mn}GV!>wzTv^7%$C}X`c7r2g%)zT<0Q4#+0LYAqzZ~0`_=RM~ z#BWtfq;9R#yA~!80DDIOz_KD|>&61pv5kqJX&t3k$U}6}P0UD;dDthq=%sy>(1{>~T270>iGrjYOZsT@?TTwgWE0J|_MGpl=cq6}{CaEvQfcjLEa-o&f+@ zQ2;f+2XH&E!LZkt$&87wm!wh74Bclc%sfN^z-Pv@chO;0vkhl&!Z0Sj(!sE^&gETO z0RR{qkY(E#7Xa!UpO1Y^{G}Mj#3uy^y?}Fo`DFyaxCj7P8NvU#3HzA%Q;0bxKCu@X zhD=u}0q}VU6K9ElvSZ>WP@pmKNe06(&0wu55dg;L*+Y-803iOD_$w&FnD{gRA8lSMKQ6Y{LtJpcf!frEfYVvLDDq!eS~(+Y;6 zI&yt=0RgaY1OQlQEieff;w4x(AoK*z1m+b90Nn}zfcYBXG4+yn-&;3{o^RQn4 z0GbVdt4*VTvX6SHxBw4@`2EFN zCDq4szA~eSgMdc^%tI^igLZy@NIL}?vw`D*E}qlL0K-neRr' . $message . '

'; - } - - if ($type == 'warning') { - echo '

' . $message . '

'; - } - - if ($type == 'error') { + if ($type == 'note') { + echo '

' . $message . '

'; + } else if ($type == 'warning') { + echo '

' . $message . '

'; + } else if ($type == 'error') { echo '

' . $message . '

'; - } - - if ($type == 'pre') { + } else if ($type == 'pre') { echo '
' . $message . '
'; + } else { + echo '

' . $message . '

'; } } }