]> _ Git - fluidbook-toolbox.git/commitdiff
wait #7828 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 26 Nov 2025 14:57:14 +0000 (15:57 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 26 Nov 2025 14:57:14 +0000 (15:57 +0100)
app/Http/Controllers/Admin/Operations/FluidbookCollection/AuditLinksOperation.php

index 54aa733fb618c49cb52f0ef9b0745264baffc482..c51bf333b524adcf6aa28f1a981150182b25009d 100644 (file)
@@ -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++;