mirror of
https://github.com/flarum/core.git
synced 2025-10-12 15:34:26 +02:00
@@ -14,7 +14,6 @@ namespace Flarum\Extension;
|
||||
use Flarum\Extension\Event\Disabling;
|
||||
use Flarum\Http\Exception\ForbiddenException;
|
||||
use Flarum\Settings\SettingsRepositoryInterface;
|
||||
use Illuminate\Contracts\Events\Dispatcher;
|
||||
|
||||
class DefaultLanguagePackGuard
|
||||
{
|
||||
@@ -28,19 +27,7 @@ class DefaultLanguagePackGuard
|
||||
$this->settings = $settings;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Dispatcher $events
|
||||
*/
|
||||
public function subscribe(Dispatcher $events)
|
||||
{
|
||||
$events->listen(Disabling::class, [$this, 'whenExtensionWillBeDisabled']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Disabling $event
|
||||
* @throws ForbiddenException
|
||||
*/
|
||||
public function whenExtensionWillBeDisabled(Disabling $event)
|
||||
public function handle(Disabling $event)
|
||||
{
|
||||
if (! in_array('flarum-locale', $event->extension->extra)) {
|
||||
return;
|
||||
|
Reference in New Issue
Block a user