Upgrade to 3.2.0

This commit is contained in:
Bastian Allgeier
2019-06-25 09:56:08 +02:00
parent 9e18cf635d
commit 9c89153d35
296 changed files with 14408 additions and 2504 deletions

View File

@@ -9,6 +9,7 @@ use Kirby\Cms\PluginAssets;
use Kirby\Cms\Response;
use Kirby\Exception\NotFoundException;
use Kirby\Http\Response\Redirect;
use Kirby\Http\Router;
use Kirby\Http\Router\Route;
use Kirby\Toolkit\F;
use Kirby\Toolkit\Str;
@@ -54,27 +55,15 @@ return function ($kirby) {
}
],
[
'pattern' => $media . '/panel/(:any)/plugins/(css|js)/(:any)/index.(css|js)',
'pattern' => $media . '/plugins/index.(css|js)',
'env' => 'media',
'action' => function (string $version, string $type) use ($kirby) {
$plugins = new PanelPlugins($type);
$plugins->publish();
'action' => function (string $type) use ($kirby) {
$plugins = new PanelPlugins();
return $kirby
->response()
->type($type)
->body($plugins->read());
}
],
[
'pattern' => $media . '/panel/plugins/index.(css|js)',
'env' => 'media',
'action' => function (string $type) use ($kirby) {
$plugins = new PanelPlugins($type);
return $kirby
->response()
->redirect($plugins->url(), 302);
->body($plugins->read($type));
}
],
[
@@ -150,7 +139,7 @@ return function ($kirby) {
// default home page
} else {
return $kirby->resolve(null, $kirby->defaultLanguage()->code());
return $kirby->defaultLanguage()->router()->call();
}
}
];
@@ -161,7 +150,7 @@ return function ($kirby) {
'method' => 'ALL',
'env' => 'site',
'action' => function ($path = null) use ($kirby, $language) {
return $kirby->resolve($path, $language->code());
return $language->router()->call($path);
}
];
}
@@ -191,7 +180,7 @@ return function ($kirby) {
}
}
return $kirby->resolve($path, $kirby->defaultLanguage()->code());
return $kirby->defaultLanguage()->router()->call($path);
}
];
} else {