Upgrade to 3.4.4

This commit is contained in:
Bastian Allgeier
2020-10-06 10:23:02 +02:00
parent c091f04115
commit 0b80361a79
53 changed files with 976 additions and 83 deletions

View File

@@ -71,10 +71,13 @@ class F
],
'image' => [
'ai',
'avif',
'bmp',
'gif',
'eps',
'ico',
'j2k',
'jp2',
'jpeg',
'jpg',
'jpe',

View File

@@ -29,6 +29,7 @@ class Mime
'aifc' => 'audio/x-aiff',
'aiff' => 'audio/x-aiff',
'avi' => 'video/x-msvideo',
'avif' => 'image/avif',
'bmp' => 'image/bmp',
'css' => 'text/css',
'csv' => ['text/csv', 'text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream'],
@@ -48,6 +49,8 @@ class Mime
'ics' => 'text/calendar',
'js' => 'application/x-javascript',
'json' => ['application/json', 'text/json'],
'j2k' => ['image/jp2'],
'jp2' => ['image/jp2'],
'jpg' => ['image/jpeg', 'image/pjpeg'],
'jpeg' => ['image/jpeg', 'image/pjpeg'],
'jpe' => ['image/jpeg', 'image/pjpeg'],

View File

@@ -353,17 +353,18 @@ class Pagination
return range($start, $end);
}
$start = $page - (int)floor($range/2);
$end = $page + (int)floor($range/2);
$middle = (int)floor($range/2);
$start = $page - $middle + ($range % 2 === 0);
$end = $start + $range - 1;
if ($start <= 0) {
$end += abs($start);
$start = 1;
$end = $range;
$start = 1;
}
if ($end > $pages) {
$start -= $end - $pages;
$end = $pages;
$start = $pages - $range + 1;
$end = $pages;
}
return range($start, $end);