mirror of
https://github.com/flarum/core.git
synced 2025-10-14 08:24:28 +02:00
Move config/permission actions to API; clean up cache flushing
This commit is contained in:
@@ -32,12 +32,10 @@ class UpdateAction extends JsonApiAction
|
||||
|
||||
app('flarum.formatter')->flush();
|
||||
|
||||
$assetPath = public_path('assets');
|
||||
$manifest = file_get_contents($assetPath . '/rev-manifest.json');
|
||||
$revisions = json_decode($manifest, true);
|
||||
$forum = app('Flarum\Forum\Actions\ClientAction');
|
||||
$forum->flushAssets();
|
||||
|
||||
foreach ($revisions as $file => $revision) {
|
||||
@unlink($assetPath . '/' . substr_replace($file, '-' . $revision, strrpos($file, '.'), 0));
|
||||
}
|
||||
$admin = app('Flarum\Admin\Actions\ClientAction');
|
||||
$admin->flushAssets();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user