From 37d9262f7a780c73bf9a9893e5334865e4fe2a4f Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 26 Nov 2025 15:57:14 +0100 Subject: [PATCH] wait #7828 @1 --- .../FluidbookCollection/AuditLinksOperation.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/app/Http/Controllers/Admin/Operations/FluidbookCollection/AuditLinksOperation.php b/app/Http/Controllers/Admin/Operations/FluidbookCollection/AuditLinksOperation.php index 54aa733fb..c51bf333b 100644 --- a/app/Http/Controllers/Admin/Operations/FluidbookCollection/AuditLinksOperation.php +++ b/app/Http/Controllers/Admin/Operations/FluidbookCollection/AuditLinksOperation.php @@ -30,10 +30,7 @@ trait AuditLinksOperation /** @var FluidbookCollection $collection */ $collection = FluidbookCollection::find($id); - $fluidbooks = []; - foreach ($collection->publications as $fluidbook) { - $fluidbooks[] = $fluidbook['fluidbook']; - } + $fluidbooks = $collection->getFluidbooksID(); $columns = [ 'fluidbook_id' => 'Fluidbook #', @@ -60,6 +57,9 @@ trait AuditLinksOperation if ($code >= 400) { $errors[] = $link; } else { + if ($link->url . '/' == $link->target_url) { + continue; + } $warnings[] = $link; } } @@ -107,12 +107,14 @@ trait AuditLinksOperation 200 => __('Everything is fine'), 301 => __('Permanent redirection: the page has definitively moved, please update the url; the former URL may not be valid indefinitely'), 308 => __('Permanent redirection: the page has definitively moved, please update the url; the former URL may not be valid indefinitely'), - 307 => __('Temporary redirection: '), + 302 => __('Temporary redirection: the page is currently redirected, this may be temporary. This could also be permanent if the developer of the site does not respect the standards.'), + 307 => __('Temporary redirection: the page is currently redirected, this may be temporary. This could also be permanent if the developer of the site does not respect the standards.'), 404 => __('Not found: the page does not exist anymore'), 401 => __('Unauthorized: the page may be accessible only to logged in users'), 403 => __('The auditing tool may have been blocked by a anti bot protection. A manual check may be needed'), + 400 => __('Bad request'), + 600 => __('The URL is invalid'), 429 => __('The URL is invalid'), - 629 => __('The URL is invalid'), 622 => __('Timeout: the server took too much time to respond. This should be temporary'), 500 => __('There is a problem on the server. This should be temporary'), 502 => __('There is a problem on the server. This should be temporary'), @@ -151,7 +153,7 @@ trait AuditLinksOperation $c = $sheet->getComment([$col, $row]); $c->getText()->createText($codes[$value]); $c->setWidth('300px'); - $c->setHeight('50px'); + $c->setHeight('80px'); } $style->getAlignment()->setVertical(Alignment::VERTICAL_CENTER); $col++; -- 2.39.5