Skip to content

Commit

Permalink
Use relative symlinks for assets
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMicky-FR committed May 22, 2020
1 parent 5a39edc commit e92a2f1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion app/Extensions/Plugin/PluginManager.php
Expand Up @@ -4,6 +4,7 @@

use Azuriom\Extensions\ExtensionManager;
use Azuriom\Extensions\UpdateManager;
use Azuriom\Support\Files;
use Azuriom\Support\Optimizer;
use Composer\Autoload\ClassLoader;
use Illuminate\Contracts\Filesystem\FileNotFoundException;
Expand Down Expand Up @@ -494,7 +495,7 @@ protected function createAssetsLink(string $plugin)
$pluginAssetsPath = $this->path($plugin, 'assets');

if ($this->files->exists($pluginAssetsPath)) {
$this->files->link($pluginAssetsPath, $this->pluginsPublicPath($plugin));
Files::relativeLink($pluginAssetsPath, $this->pluginsPublicPath($plugin));
}
}
}
5 changes: 3 additions & 2 deletions app/Extensions/Theme/ThemeManager.php
Expand Up @@ -5,6 +5,7 @@
use Azuriom\Extensions\ExtensionManager;
use Azuriom\Extensions\UpdateManager;
use Azuriom\Models\Setting;
use Azuriom\Support\Files;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Support\Facades\Cache;
use RuntimeException;
Expand Down Expand Up @@ -327,7 +328,7 @@ protected function loadConfig(string $theme)

if ($themeConfig !== null) {
foreach ($themeConfig as $key => $value) {
config(['theme.'.$key => $value]);
setting()->set('theme.'.$key, $value);
}
}
}
Expand All @@ -341,7 +342,7 @@ protected function createAssetsLink(string $theme)
$themeAssetsPath = $this->path('assets', $theme);

if ($this->files->exists($themeAssetsPath)) {
$this->files->link($themeAssetsPath, $this->themesPublicPath($theme));
Files::relativeLink($themeAssetsPath, $this->themesPublicPath($theme));
}
}
}

0 comments on commit e92a2f1

Please sign in to comment.