Upgrade to 3.2.5
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
<?php
|
||||
|
||||
use Kirby\Cms\Auth;
|
||||
use Kirby\Exception\PermissionException;
|
||||
use Kirby\Toolkit\Str;
|
||||
|
||||
return function () {
|
||||
$auth = $this->kirby()->auth();
|
||||
|
@@ -1,12 +1,5 @@
|
||||
<?php
|
||||
|
||||
use Kirby\Cms\Files;
|
||||
use Kirby\Cms\Languages;
|
||||
use Kirby\Cms\Pages;
|
||||
use Kirby\Cms\Roles;
|
||||
use Kirby\Cms\Translations;
|
||||
use Kirby\Cms\Users;
|
||||
|
||||
/**
|
||||
* Api Collection Definitions
|
||||
*/
|
||||
@@ -17,7 +10,7 @@ return [
|
||||
*/
|
||||
'children' => [
|
||||
'model' => 'page',
|
||||
'type' => Pages::class,
|
||||
'type' => 'Kirby\Cms\Pages',
|
||||
'view' => 'compact'
|
||||
],
|
||||
|
||||
@@ -26,7 +19,7 @@ return [
|
||||
*/
|
||||
'files' => [
|
||||
'model' => 'file',
|
||||
'type' => Files::class
|
||||
'type' => 'Kirby\Cms\Files'
|
||||
],
|
||||
|
||||
/**
|
||||
@@ -34,7 +27,7 @@ return [
|
||||
*/
|
||||
'languages' => [
|
||||
'model' => 'language',
|
||||
'type' => Languages::class,
|
||||
'type' => 'Kirby\Cms\Languages',
|
||||
'view' => 'compact'
|
||||
],
|
||||
|
||||
@@ -43,7 +36,7 @@ return [
|
||||
*/
|
||||
'pages' => [
|
||||
'model' => 'page',
|
||||
'type' => Pages::class,
|
||||
'type' => 'Kirby\Cms\Pages',
|
||||
'view' => 'compact'
|
||||
],
|
||||
|
||||
@@ -52,7 +45,7 @@ return [
|
||||
*/
|
||||
'roles' => [
|
||||
'model' => 'role',
|
||||
'type' => Roles::class,
|
||||
'type' => 'Kirby\Cms\Roles',
|
||||
'view' => 'compact'
|
||||
],
|
||||
|
||||
@@ -61,7 +54,7 @@ return [
|
||||
*/
|
||||
'translations' => [
|
||||
'model' => 'translation',
|
||||
'type' => Translations::class,
|
||||
'type' => 'Kirby\Cms\Translations',
|
||||
'view' => 'compact'
|
||||
],
|
||||
|
||||
@@ -73,7 +66,7 @@ return [
|
||||
return $this->users();
|
||||
},
|
||||
'model' => 'user',
|
||||
'type' => Users::class,
|
||||
'type' => 'Kirby\Cms\Users',
|
||||
'view' => 'compact'
|
||||
]
|
||||
|
||||
|
@@ -1,9 +1,5 @@
|
||||
<?php
|
||||
|
||||
use Kirby\Cms\File;
|
||||
use Kirby\Cms\Page;
|
||||
use Kirby\Cms\Site;
|
||||
|
||||
/**
|
||||
* Api Model Definitions
|
||||
*/
|
||||
|
@@ -115,7 +115,7 @@ return [
|
||||
return $file->url(true);
|
||||
},
|
||||
],
|
||||
'type' => File::class,
|
||||
'type' => 'Kirby\Cms\File',
|
||||
'views' => [
|
||||
'default' => [
|
||||
'content',
|
||||
|
@@ -20,7 +20,7 @@ return [
|
||||
return $blueprint->title();
|
||||
},
|
||||
],
|
||||
'type' => FileBlueprint::class,
|
||||
'type' => 'Kirby\Cms\FileBlueprint',
|
||||
'views' => [
|
||||
],
|
||||
];
|
||||
|
@@ -44,7 +44,7 @@ return [
|
||||
return $file->url(true);
|
||||
},
|
||||
],
|
||||
'type' => FileVersion::class,
|
||||
'type' => 'Kirby\Cms\FileVersion',
|
||||
'views' => [
|
||||
'default' => [
|
||||
'dimensions',
|
||||
|
@@ -29,7 +29,7 @@ return [
|
||||
return $language->url();
|
||||
},
|
||||
],
|
||||
'type' => Language::class,
|
||||
'type' => 'Kirby\Cms\Language',
|
||||
'views' => [
|
||||
'compact' => [
|
||||
'code',
|
||||
|
@@ -104,7 +104,7 @@ return [
|
||||
return $page->url();
|
||||
},
|
||||
],
|
||||
'type' => Page::class,
|
||||
'type' => 'Kirby\Cms\Page',
|
||||
'views' => [
|
||||
'compact' => [
|
||||
'id',
|
||||
|
@@ -29,7 +29,7 @@ return [
|
||||
return $blueprint->title();
|
||||
},
|
||||
],
|
||||
'type' => PageBlueprint::class,
|
||||
'type' => 'Kirby\Cms\PageBlueprint',
|
||||
'views' => [
|
||||
],
|
||||
];
|
||||
|
@@ -20,7 +20,7 @@ return [
|
||||
return $role->title();
|
||||
},
|
||||
],
|
||||
'type' => Role::class,
|
||||
'type' => 'Kirby\Cms\Role',
|
||||
'views' => [
|
||||
'compact' => [
|
||||
'description',
|
||||
|
@@ -39,7 +39,7 @@ return [
|
||||
return $site->url();
|
||||
},
|
||||
],
|
||||
'type' => Site::class,
|
||||
'type' => 'Kirby\Cms\Site',
|
||||
'views' => [
|
||||
'compact' => [
|
||||
'title',
|
||||
|
@@ -20,7 +20,7 @@ return [
|
||||
return $blueprint->title();
|
||||
},
|
||||
],
|
||||
'type' => SiteBlueprint::class,
|
||||
'type' => 'Kirby\Cms\SiteBlueprint',
|
||||
'views' => [
|
||||
],
|
||||
];
|
||||
|
@@ -11,6 +11,9 @@ return [
|
||||
'ascii' => function () {
|
||||
return Str::$ascii;
|
||||
},
|
||||
'defaultLanguage' => function () {
|
||||
return $this->kirby()->option('panel.language', 'en');
|
||||
},
|
||||
'isOk' => function (System $system) {
|
||||
return $system->isOk();
|
||||
},
|
||||
@@ -62,7 +65,7 @@ return [
|
||||
}
|
||||
},
|
||||
'kirbytext' => function () {
|
||||
return $this->kirby()->option('panel')['kirbytext'] ?? true;
|
||||
return $this->kirby()->option('panel.kirbytext') ?? true;
|
||||
},
|
||||
'user' => function () {
|
||||
return $this->user();
|
||||
@@ -71,7 +74,7 @@ return [
|
||||
return $this->kirby()->version();
|
||||
}
|
||||
],
|
||||
'type' => System::class,
|
||||
'type' => 'Kirby\Cms\System',
|
||||
'views' => [
|
||||
'login' => [
|
||||
'isOk',
|
||||
@@ -90,6 +93,7 @@ return [
|
||||
],
|
||||
'panel' => [
|
||||
'ascii',
|
||||
'defaultLanguage',
|
||||
'isOk',
|
||||
'isInstalled',
|
||||
'isLocal',
|
||||
|
@@ -23,7 +23,7 @@ return [
|
||||
return $translation->name();
|
||||
},
|
||||
],
|
||||
'type' => Translation::class,
|
||||
'type' => 'Kirby\Cms\Translation',
|
||||
'views' => [
|
||||
'compact' => [
|
||||
'direction',
|
||||
|
@@ -54,7 +54,7 @@ return [
|
||||
return $user->username();
|
||||
}
|
||||
],
|
||||
'type' => User::class,
|
||||
'type' => 'Kirby\Cms\User',
|
||||
'views' => [
|
||||
'default' => [
|
||||
'avatar',
|
||||
|
@@ -20,7 +20,7 @@ return [
|
||||
return $blueprint->title();
|
||||
},
|
||||
],
|
||||
'type' => UserBlueprint::class,
|
||||
'type' => 'Kirby\Cms\UserBlueprint',
|
||||
'views' => [
|
||||
],
|
||||
];
|
||||
|
@@ -1,8 +1,7 @@
|
||||
<?php
|
||||
|
||||
use Kirby\Exception\NotFoundException;
|
||||
use Kirby\Exception\InvalidArgumentException;
|
||||
use Kirby\Exception\PermissionException;
|
||||
use Kirby\Exception\NotFoundException;
|
||||
|
||||
/**
|
||||
* Authentication
|
||||
|
@@ -1,7 +1,5 @@
|
||||
<?php
|
||||
|
||||
use Kirby\Exception\InvalidArgumentException;
|
||||
|
||||
/**
|
||||
* Files Routes
|
||||
*/
|
||||
|
@@ -1,7 +1,5 @@
|
||||
<?php
|
||||
|
||||
use Kirby\Exception\InvalidArgumentException;
|
||||
|
||||
/**
|
||||
* Page Routes
|
||||
*/
|
||||
|
@@ -8,7 +8,14 @@ return [
|
||||
'pattern' => 'roles',
|
||||
'method' => 'GET',
|
||||
'action' => function () {
|
||||
return $this->kirby()->roles();
|
||||
switch (get('canBe')) {
|
||||
case 'changed':
|
||||
return $this->kirby()->roles()->canBeChanged();
|
||||
case 'created':
|
||||
return $this->kirby()->roles()->canBeCreated();
|
||||
default:
|
||||
return $this->kirby()->roles();
|
||||
}
|
||||
}
|
||||
],
|
||||
[
|
||||
|
@@ -1,5 +1,8 @@
|
||||
<?php
|
||||
|
||||
use Kirby\Exception\Exception;
|
||||
use Kirby\Exception\InvalidArgumentException;
|
||||
|
||||
/**
|
||||
* System Routes
|
||||
*/
|
||||
@@ -54,11 +57,11 @@ return [
|
||||
}
|
||||
|
||||
if ($system->isInstallable() === false) {
|
||||
throw new Exception('The panel cannot be installed');
|
||||
throw new Exception('The Panel cannot be installed');
|
||||
}
|
||||
|
||||
if ($system->isInstalled() === true) {
|
||||
throw new Exception('The panel is already installed');
|
||||
throw new Exception('The Panel is already installed');
|
||||
}
|
||||
|
||||
// create the first user
|
||||
|
Reference in New Issue
Block a user