M3 Integration fixes

This commit is contained in:
Mark Gregory
2026-09-21 10:14:57 +01:00
parent 4af997c465
commit 6d60cbff84
5853 changed files with 79032 additions and 1825 deletions
+8 -10
View File
@@ -52,18 +52,16 @@ class DocumentationAttachment extends Model
{
$bytes = (int) $this->size;
$label = number_format($bytes / 1048576, 1) . ' MB';
if ($bytes <= 0) {
return 'Unknown size';
$label = 'Unknown size';
} elseif ($bytes < 1024) {
$label = $bytes . ' B';
} elseif ($bytes < 1048576) {
$label = number_format($bytes / 1024, 1) . ' KB';
}
if ($bytes < 1024) {
return $bytes . ' B';
}
if ($bytes < 1048576) {
return number_format($bytes / 1024, 1) . ' KB';
}
return number_format($bytes / 1048576, 1) . ' MB';
return $label;
}
}