mirror of
https://github.com/pelican-dev/panel.git
synced 2025-06-20 17:41:08 +02:00
This is now an array
This commit is contained in:
parent
a42cb193a3
commit
4fa49ae915
@ -870,11 +870,9 @@ class EditServer extends EditRecord
|
|||||||
|
|
||||||
private function shouldHideComponent(ServerVariable $serverVariable, Forms\Components\Component $component): bool
|
private function shouldHideComponent(ServerVariable $serverVariable, Forms\Components\Component $component): bool
|
||||||
{
|
{
|
||||||
$rules = str($serverVariable->variable->rules)->explode('|');
|
|
||||||
|
|
||||||
$containsRuleIn = array_first($serverVariable->variable->rules, fn ($value) => str($value)->startsWith('in:'), false);
|
$containsRuleIn = array_first($serverVariable->variable->rules, fn ($value) => str($value)->startsWith('in:'), false);
|
||||||
|
|
||||||
if ($rules->contains('port')) {
|
if (collect($serverVariable->variable->rules)->contains('port')) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -961,7 +959,7 @@ class EditServer extends EditRecord
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach ($egg->variables as $variable) {
|
foreach ($egg->variables as $variable) {
|
||||||
if (!in_array('port', explode('|', $variable->rules))) {
|
if (!in_array('port', $variable->rules)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user