Upgrade to 3.6.0

This commit is contained in:
Bastian Allgeier
2021-11-16 14:53:37 +01:00
parent 7388fa4d24
commit 92b7a330fa
318 changed files with 20017 additions and 6878 deletions

View File

@@ -2,9 +2,9 @@
namespace Kirby\Cms;
use Kirby\Filesystem\Dir;
use Kirby\Filesystem\F;
use Kirby\Http\Response;
use Kirby\Toolkit\Dir;
use Kirby\Toolkit\F;
/**
* Plugin assets are automatically copied/linked
@@ -66,15 +66,11 @@ class PluginAssets
static::clean($pluginName);
$target = $plugin->mediaRoot() . '/' . $filename;
$url = $plugin->mediaUrl() . '/' . $filename;
// create the plugin directory first
Dir::make($plugin->mediaRoot(), true);
if (F::link($source, $target, 'symlink') === true) {
return Response::redirect($url);
}
// create a symlink if possible
F::link($source, $target, 'symlink');
// return the file response
return Response::file($source);
}
}