mirror of
https://github.com/pelican-dev/panel.git
synced 2025-11-09 18:19:27 +01:00
fix load behaviour
This commit is contained in:
parent
f246dff768
commit
55b1d6e960
@ -114,12 +114,12 @@ class Plugin extends Model implements HasPluginSettings
|
|||||||
|
|
||||||
public function shouldLoad(): bool
|
public function shouldLoad(): bool
|
||||||
{
|
{
|
||||||
return $this->isEnabled() && $this->isInstalled() && $this->isCompatible();
|
return !$this->isDisabled() && $this->isInstalled() && !$this->isIncompatible();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function shouldLoadPanel(string $panelId): bool
|
public function shouldLoadPanel(string $panelId): bool
|
||||||
{
|
{
|
||||||
return $this->shouldLoad() && ($this->panels === null || in_array($panelId, explode(',', $this->panels)));
|
return !$this->isDisabled() && $this->isInstalled() && !$this->isIncompatible() && ($this->panels === null || in_array($panelId, explode(',', $this->panels)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function canEnable(): bool
|
public function canEnable(): bool
|
||||||
@ -129,7 +129,7 @@ class Plugin extends Model implements HasPluginSettings
|
|||||||
|
|
||||||
public function canDisable(): bool
|
public function canDisable(): bool
|
||||||
{
|
{
|
||||||
return $this->shouldLoad();
|
return $this->isEnabled() && $this->isInstalled() && $this->isCompatible();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isEnabled(): bool
|
public function isEnabled(): bool
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user