Upgrade to 3.3.0
This commit is contained in:
@@ -7,7 +7,7 @@ return function () {
|
||||
|
||||
// csrf token check
|
||||
if ($auth->type() === 'session' && $auth->csrf() === false) {
|
||||
throw new PermissionException('Unauthenticated', 403);
|
||||
throw new PermissionException('Unauthenticated');
|
||||
}
|
||||
|
||||
// get user from session or basic auth
|
||||
@@ -19,5 +19,5 @@ return function () {
|
||||
return $user;
|
||||
}
|
||||
|
||||
throw new PermissionException('Unauthenticated', 403);
|
||||
throw new PermissionException('Unauthenticated');
|
||||
};
|
||||
|
@@ -27,8 +27,7 @@ return [
|
||||
*/
|
||||
'languages' => [
|
||||
'model' => 'language',
|
||||
'type' => 'Kirby\Cms\Languages',
|
||||
'view' => 'compact'
|
||||
'type' => 'Kirby\Cms\Languages'
|
||||
],
|
||||
|
||||
/**
|
||||
|
@@ -48,13 +48,16 @@ return [
|
||||
return $file->next();
|
||||
},
|
||||
'nextWithTemplate' => function (File $file) {
|
||||
$files = $file->templateSiblings()->sortBy('sort', 'asc');
|
||||
$files = $file->templateSiblings()->sortBy('sort', 'asc', 'filename', 'asc');
|
||||
$index = $files->indexOf($file);
|
||||
|
||||
return $files->nth($index + 1);
|
||||
},
|
||||
'niceSize' => function (File $file) {
|
||||
return $file->niceSize();
|
||||
},
|
||||
'options' => function (File $file) {
|
||||
return $file->permissions()->toArray();
|
||||
return $file->panelOptions();
|
||||
},
|
||||
'panelIcon' => function (File $file) {
|
||||
return $file->panelIcon();
|
||||
@@ -69,32 +72,23 @@ return [
|
||||
return $file->prev();
|
||||
},
|
||||
'prevWithTemplate' => function (File $file) {
|
||||
$files = $file->templateSiblings()->sortBy('sort', 'asc');
|
||||
$files = $file->templateSiblings()->sortBy('sort', 'asc', 'filename', 'asc');
|
||||
$index = $files->indexOf($file);
|
||||
|
||||
return $files->nth($index - 1);
|
||||
},
|
||||
'niceSize' => function (File $file) {
|
||||
return $file->niceSize();
|
||||
},
|
||||
'panelIcon' => function (File $file) {
|
||||
return $file->panelIcon();
|
||||
},
|
||||
'panelImage' => function (File $file) {
|
||||
return $file->panelImage();
|
||||
},
|
||||
'parent' => function (File $file) {
|
||||
return $file->parent();
|
||||
},
|
||||
'parents' => function (File $file) {
|
||||
return $file->parents()->flip();
|
||||
},
|
||||
'template' => function (File $file) {
|
||||
return $file->template();
|
||||
},
|
||||
'size' => function (File $file) {
|
||||
return $file->size();
|
||||
},
|
||||
'template' => function (File $file) {
|
||||
return $file->template();
|
||||
},
|
||||
'thumbs' => function ($file) {
|
||||
if ($file->isResizable() === false) {
|
||||
return null;
|
||||
|
@@ -31,12 +31,14 @@ return [
|
||||
],
|
||||
'type' => 'Kirby\Cms\Language',
|
||||
'views' => [
|
||||
'compact' => [
|
||||
'default' => [
|
||||
'code',
|
||||
'default',
|
||||
'direction',
|
||||
'locale',
|
||||
'name',
|
||||
'rules',
|
||||
'direction'
|
||||
'url'
|
||||
]
|
||||
]
|
||||
];
|
||||
|
@@ -27,7 +27,7 @@ return [
|
||||
return $page->errors();
|
||||
},
|
||||
'files' => function (Page $page) {
|
||||
return $page->files()->sortBy('sort', 'asc');
|
||||
return $page->files()->sortBy('sort', 'asc', 'filename', 'asc');
|
||||
},
|
||||
'hasChildren' => function (Page $page) {
|
||||
return $page->hasChildren();
|
||||
@@ -56,7 +56,7 @@ return [
|
||||
return $page->num();
|
||||
},
|
||||
'options' => function (Page $page) {
|
||||
return $page->permissions()->toArray();
|
||||
return $page->panelOptions(['preview']);
|
||||
},
|
||||
'panelIcon' => function (Page $page) {
|
||||
return $page->panelIcon();
|
||||
|
@@ -24,7 +24,7 @@ return [
|
||||
return $site->drafts();
|
||||
},
|
||||
'files' => function (Site $site) {
|
||||
return $site->files()->sortBy('sort', 'asc');
|
||||
return $site->files()->sortBy('sort', 'asc', 'filename', 'asc');
|
||||
},
|
||||
'options' => function (Site $site) {
|
||||
return $site->permissions()->toArray();
|
||||
|
@@ -98,7 +98,7 @@ return [
|
||||
'isInstalled',
|
||||
'isLocal',
|
||||
'kirbytext',
|
||||
'languages' => 'compact',
|
||||
'languages',
|
||||
'license',
|
||||
'multilang',
|
||||
'requirements',
|
||||
|
@@ -24,7 +24,7 @@ return [
|
||||
return $user->email();
|
||||
},
|
||||
'files' => function (User $user) {
|
||||
return $user->files()->sortBy('sort', 'asc');
|
||||
return $user->files()->sortBy('sort', 'asc', 'filename', 'asc');
|
||||
},
|
||||
'id' => function (User $user) {
|
||||
return $user->id();
|
||||
@@ -39,7 +39,7 @@ return [
|
||||
return $user->next();
|
||||
},
|
||||
'options' => function (User $user) {
|
||||
return $user->permissions()->toArray();
|
||||
return $user->panelOptions();
|
||||
},
|
||||
'permissions' => function (User $user) {
|
||||
return $user->role()->permissions()->toArray();
|
||||
|
@@ -27,7 +27,7 @@ return [
|
||||
'pattern' => '(:all)/files',
|
||||
'method' => 'GET',
|
||||
'action' => function (string $path) {
|
||||
return $this->parent($path)->files()->sortBy('sort', 'asc');
|
||||
return $this->parent($path)->files()->sortBy('sort', 'asc', 'filename', 'asc');
|
||||
}
|
||||
],
|
||||
[
|
||||
|
Reference in New Issue
Block a user