Upgrade to 3.6.5
This commit is contained in:
@@ -16,6 +16,11 @@ use Throwable;
|
||||
*/
|
||||
class File extends Model
|
||||
{
|
||||
/**
|
||||
* @var \Kirby\Cms\File
|
||||
*/
|
||||
protected $model;
|
||||
|
||||
/**
|
||||
* Breadcrumb array
|
||||
*
|
||||
@@ -423,11 +428,11 @@ class File extends Model
|
||||
return [
|
||||
'next' => function () use ($file, $siblings): ?array {
|
||||
$next = $siblings->nth($siblings->indexOf($file) + 1);
|
||||
return $next ? $next->panel()->toLink('filename') : null;
|
||||
return $this->toPrevNextLink($next, 'filename');
|
||||
},
|
||||
'prev' => function () use ($file, $siblings): ?array {
|
||||
$prev = $siblings->nth($siblings->indexOf($file) - 1);
|
||||
return $prev ? $prev->panel()->toLink('filename') : null;
|
||||
return $this->toPrevNextLink($prev, 'filename');
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user