wip
This commit is contained in:
1 parent
d697688c5f
commit
ef5282e91d
1 file changed
+7
-6
@@ -180,21 +180,22 @@ trait PlayerQuery
|
|||||||
{
|
{
|
||||||
switch ($this->season_or_date) {
|
switch ($this->season_or_date) {
|
||||||
case 'season':
|
case 'season':
|
||||||
if (! $this->season_selected) {
|
|
||||||
$this->season_selected = $this->getCurrentSeason();
|
|
||||||
}
|
|
||||||
if ($this->season_mode == 'fullyear') {
|
if ($this->season_mode == 'fullyear') {
|
||||||
// Keeps elements where '/' is FALSE
|
// Keeps elements where '/' is FALSE
|
||||||
$this->season_selected = array_filter($this->season_selected, fn ($item) => ! str_contains($item, '/'));
|
$this->season_selected = array_filter($this->season_selected, fn ($item) => ! str_contains($item, '/'));
|
||||||
|
if (! $this->season_selected) {
|
||||||
|
$this->season_selected = $this->getCurrentSeason();
|
||||||
|
}
|
||||||
$this->season_selected = array_map('intval', $this->season_selected);
|
$this->season_selected = array_map('intval', $this->season_selected);
|
||||||
} else {
|
} else {
|
||||||
// Keeps elements ONLY if '/' returns TRUE
|
// Keeps elements ONLY if '/' returns TRUE
|
||||||
$this->season_selected = array_filter($this->season_selected, fn ($item) => str_contains($item, '/'));
|
$this->season_selected = array_filter($this->season_selected, fn ($item) => str_contains($item, '/'));
|
||||||
|
if (! $this->season_selected) {
|
||||||
|
$this->season_selected = $this->getCurrentSeason();
|
||||||
|
}
|
||||||
$this->season_selected = array_map('strval', $this->season_selected);
|
$this->season_selected = array_map('strval', $this->season_selected);
|
||||||
}
|
}
|
||||||
if (! $this->season_selected) {
|
|
||||||
$this->season_selected = $this->getCurrentSeason();
|
|
||||||
}
|
|
||||||
|
|
||||||
Log::debug('season_selected', [$this->season_mode, $this->season_selected]);
|
Log::debug('season_selected', [$this->season_mode, $this->season_selected]);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user