mirror of
https://github.com/flarum/core.git
synced 2025-10-12 15:34:26 +02:00
Prevent saving invalid custom less (#1273)
* Prevent saving invalid custom less * Fix formatting * Fix formatting again * Move custom less format check to its own listener * Move listener to AdminServiceProvider * Rename listener method
This commit is contained in:
committed by
Daniël Klabbers
parent
a0c95e6705
commit
d2f187716e
@@ -11,6 +11,7 @@
|
||||
|
||||
namespace Flarum\Admin;
|
||||
|
||||
use Flarum\Core\Listener\CheckCustomLessFormat;
|
||||
use Flarum\Event\ExtensionWasDisabled;
|
||||
use Flarum\Event\ExtensionWasEnabled;
|
||||
use Flarum\Event\SettingWasSet;
|
||||
@@ -46,6 +47,8 @@ class AdminServiceProvider extends AbstractServiceProvider
|
||||
$this->flushWebAppAssetsWhenThemeChanged();
|
||||
|
||||
$this->flushWebAppAssetsWhenExtensionsChanged();
|
||||
|
||||
$this->checkCustomLessFormat();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -93,4 +96,11 @@ class AdminServiceProvider extends AbstractServiceProvider
|
||||
{
|
||||
return $this->app->make(WebApp::class)->getAssets();
|
||||
}
|
||||
|
||||
protected function checkCustomLessFormat()
|
||||
{
|
||||
$events = $this->app->make('events');
|
||||
|
||||
$events->subscribe(CheckCustomLessFormat::class);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user