Update to Kirby 4.7.0
This commit is contained in:
parent
02a9ab387c
commit
ba25a9a198
509 changed files with 26604 additions and 14872 deletions
|
@ -11,31 +11,34 @@ return [
|
|||
$system = $kirby->system();
|
||||
$updateStatus = $system->updateStatus();
|
||||
$license = $system->license();
|
||||
$debugMode = $kirby->option('debug', false) === true;
|
||||
$isLocal = $system->isLocal();
|
||||
|
||||
$environment = [
|
||||
[
|
||||
'label' => $license ? I18n::translate('license') : I18n::translate('license.register.label'),
|
||||
'value' => $license ? 'Kirby 3' : I18n::translate('license.unregistered.label'),
|
||||
'theme' => $license ? null : 'negative',
|
||||
'dialog' => $license ? 'license' : 'registration'
|
||||
'label' => $license->status()->label(),
|
||||
'value' => $license->label(),
|
||||
'theme' => $license->status()->theme(),
|
||||
'icon' => $license->status()->icon(),
|
||||
'dialog' => $license->status()->dialog()
|
||||
],
|
||||
[
|
||||
'label' => $updateStatus?->label() ?? I18n::translate('version'),
|
||||
'value' => $kirby->version(),
|
||||
'link' => (
|
||||
$updateStatus ?
|
||||
$updateStatus->url() :
|
||||
'https://github.com/getkirby/kirby/releases/tag/' . $kirby->version()
|
||||
),
|
||||
'theme' => $updateStatus?->theme()
|
||||
'link' => $updateStatus?->url() ??
|
||||
'https://github.com/getkirby/kirby/releases/tag/' . $kirby->version(),
|
||||
'theme' => $updateStatus?->theme(),
|
||||
'icon' => $updateStatus?->icon() ?? 'info'
|
||||
],
|
||||
[
|
||||
'label' => 'PHP',
|
||||
'value' => phpversion()
|
||||
'value' => phpversion(),
|
||||
'icon' => 'code'
|
||||
],
|
||||
[
|
||||
'label' => I18n::translate('server'),
|
||||
'value' => $system->serverSoftware() ?? '?'
|
||||
'value' => $system->serverSoftwareShort() ?? '?',
|
||||
'icon' => 'server'
|
||||
]
|
||||
];
|
||||
|
||||
|
@ -44,10 +47,14 @@ return [
|
|||
$plugins = $system->plugins()->values(function ($plugin) use (&$exceptions) {
|
||||
$authors = $plugin->authorsNames();
|
||||
$updateStatus = $plugin->updateStatus();
|
||||
$version = $updateStatus?->toArray() ?? $plugin->version() ?? '–';
|
||||
$version = $updateStatus?->toArray();
|
||||
$version ??= $plugin->version() ?? '–';
|
||||
|
||||
if ($updateStatus !== null) {
|
||||
$exceptions = array_merge($exceptions, $updateStatus->exceptionMessages());
|
||||
$exceptions = [
|
||||
...$exceptions,
|
||||
...$updateStatus->exceptionMessages()
|
||||
];
|
||||
}
|
||||
|
||||
return [
|
||||
|
@ -63,15 +70,29 @@ return [
|
|||
|
||||
$security = $updateStatus?->messages() ?? [];
|
||||
|
||||
if ($kirby->option('debug', false) === true) {
|
||||
if ($isLocal === true) {
|
||||
$security[] = [
|
||||
'id' => 'debug',
|
||||
'text' => I18n::translate('system.issues.debug'),
|
||||
'link' => 'https://getkirby.com/security/debug'
|
||||
'id' => 'local',
|
||||
'icon' => 'info',
|
||||
'theme' => 'info',
|
||||
'text' => I18n::translate('system.issues.local')
|
||||
];
|
||||
}
|
||||
|
||||
if ($kirby->environment()->https() !== true) {
|
||||
if ($debugMode === true) {
|
||||
$security[] = [
|
||||
'id' => 'debug',
|
||||
'icon' => $isLocal ? 'info' : 'alert',
|
||||
'theme' => $isLocal ? 'info' : 'negative',
|
||||
'text' => I18n::translate('system.issues.debug'),
|
||||
'link' => 'https://getkirby.com/security/debug'
|
||||
];
|
||||
}
|
||||
|
||||
if (
|
||||
$isLocal === false &&
|
||||
$kirby->environment()->https() !== true
|
||||
) {
|
||||
$security[] = [
|
||||
'id' => 'https',
|
||||
'text' => I18n::translate('system.issues.https'),
|
||||
|
@ -79,19 +100,34 @@ return [
|
|||
];
|
||||
}
|
||||
|
||||
if ($kirby->option('panel.vue.compiler', null) === null) {
|
||||
$security[] = [
|
||||
'id' => 'vue-compiler',
|
||||
'link' => 'https://getkirby.com/security/vue-compiler',
|
||||
'text' => I18n::translate('system.issues.vue.compiler'),
|
||||
'theme' => 'notice'
|
||||
];
|
||||
}
|
||||
|
||||
// sensitive URLs
|
||||
if ($isLocal === false) {
|
||||
$sensitive = [
|
||||
'content' => $system->exposedFileUrl('content'),
|
||||
'git' => $system->exposedFileUrl('git'),
|
||||
'kirby' => $system->exposedFileUrl('kirby'),
|
||||
'site' => $system->exposedFileUrl('site')
|
||||
];
|
||||
}
|
||||
|
||||
return [
|
||||
'component' => 'k-system-view',
|
||||
'props' => [
|
||||
'environment' => $environment,
|
||||
'exceptions' => $kirby->option('debug') === true ? $exceptions : [],
|
||||
'exceptions' => $debugMode ? $exceptions : [],
|
||||
'info' => $system->info(),
|
||||
'plugins' => $plugins,
|
||||
'security' => $security,
|
||||
'urls' => [
|
||||
'content' => $system->exposedFileUrl('content'),
|
||||
'git' => $system->exposedFileUrl('git'),
|
||||
'kirby' => $system->exposedFileUrl('kirby'),
|
||||
'site' => $system->exposedFileUrl('site')
|
||||
]
|
||||
'urls' => $sensitive ?? null
|
||||
]
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue