From c93417301a2f768f57cc5cb7f2308a5e715bd39c Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Sun, 22 Mar 2026 16:34:40 +0100 Subject: [PATCH] Quests/Fixup * fix showing "Gains:" header on detail page if there is nothing to be gained --- endpoints/quest/quest.php | 5 ++++- template/pages/quest.tpl.php | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/endpoints/quest/quest.php b/endpoints/quest/quest.php index 815e5777..36e4a206 100644 --- a/endpoints/quest/quest.php +++ b/endpoints/quest/quest.php @@ -1216,7 +1216,10 @@ class QuestBaseResponse extends TemplateResponse implements ICache $gains[5] = $this->subject->getField('rewardArenaPoints'); // honor points - $gains[4] = [$this->subject->getField('rewardHonorPoints'), $side]; + if ($_ = $this->subject->getField('rewardHonorPoints')) + $gains[4] = [$_, $side]; + else + $gains[4] = null; // talent points $gains[3] = $this->subject->getField('rewardTalents'); diff --git a/template/pages/quest.tpl.php b/template/pages/quest.tpl.php index 26796f55..b59bb47a 100644 --- a/template/pages/quest.tpl.php +++ b/template/pages/quest.tpl.php @@ -171,7 +171,7 @@ if ([$xp, $rep, $title, $tp, $honor, $arena] = $this->gains): echo '
  • '.Lang::quest('bonusTalents', [$tp])."
  • \n"; endif; - if ($arena || $honor[0]): + if ($arena || $honor): echo '
  • '; if ($honor[0]): $a = ''.$honor[0].'';