Upgrade to 3.9.3

This commit is contained in:
Bastian Allgeier
2023-03-30 15:17:37 +02:00
parent 20e971adb4
commit cd495f054e
47 changed files with 3386 additions and 2384 deletions

View File

@@ -162,10 +162,9 @@ return [
}
// count all uploaded files
$total = count($this->data);
$max = $this->max ? $this->max - $total : null;
$max = $this->max ? $this->max - $this->total : null;
if ($this->max && $total === $this->max - 1) {
if ($this->max && $this->total === $this->max - 1) {
$multiple = false;
} else {
$multiple = true;
@@ -179,7 +178,10 @@ return [
'max' => $max,
'api' => $this->parent->apiUrl(true) . '/files',
'attributes' => array_filter([
'sort' => $this->sortable === true ? $total + 1 : null,
// TODO: an edge issue that needs to be solved:
// if multiple users load the same section at the same time
// and upload a file, uploaded files have the same sort number
'sort' => $this->sortable === true ? $this->total + 1 : null,
'template' => $template
])
];