Achievements/Fixup

* fix fetching achievements from child catgs if selected catg is empty
This commit is contained in:
Sarjuuk
2025-10-11 22:25:01 +02:00
parent 40e98081c9
commit 9b0aa5c885

View File

@@ -119,7 +119,7 @@ class AchievementsBaseResponse extends TemplateResponse implements ICache
$conditions = [];
if ($fiCnd)
$conditions[] = $fiCnd;
if ($catList = DB::Aowow()->SelectCol('SELECT `id` FROM ?_achievementcategory WHERE `parentCat` IN (?a) OR `parentCat2` IN (?a) ', end($this->category), end($this->category)))
if ($catList = DB::Aowow()->SelectCol('SELECT `id` FROM ?_achievementcategory WHERE `parentCat` IN (?a) OR `parentCat2` IN (?a) ', $this->category, $this->category))
$conditions[] = ['category', $catList];
$acvList = new AchievementList($conditions, ['calcTotal' => true]);