fix: wish priority not showing

This commit is contained in:
grandeljay 2023-07-20 15:07:07 +02:00
parent 815f1cbd37
commit 86c7379328
2 changed files with 3 additions and 2 deletions

View file

@ -95,7 +95,7 @@ switch ($_SERVER['REQUEST_METHOD']) {
$wish_description = addslashes(filter_input(INPUT_POST, 'wish_description', FILTER_SANITIZE_SPECIAL_CHARS));
$wish_image = addslashes(filter_input(INPUT_POST, 'wish_image', FILTER_SANITIZE_URL));
$wish_url = addslashes(filter_input(INPUT_POST, 'wish_url', FILTER_SANITIZE_URL));
$wish_priority = addslashes(filter_input(INPUT_POST, 'wish_priority', FILTER_SANITIZE_NUMBER_INT));
$wish_priority = filter_input(INPUT_POST, 'wish_priority', FILTER_SANITIZE_NUMBER_INT);
$wish_is_purchasable = isset($_POST['wish_is_purchasable']);
if (Wish::NO_IMAGE === $wish_image) {
@ -140,6 +140,7 @@ switch ($_SERVER['REQUEST_METHOD']) {
$wish_description = empty($wish_description) ? null : $wish_description ;
$wish_image = empty($wish_image) || Wish::NO_IMAGE === $wish_image ? null : $wish_image ;
$wish_url = empty($wish_url) ? null : $wish_url ;
$wish_priority = empty($wish_priority) ? null : $wish_priority ;
$database
->query(

View file

@ -178,7 +178,7 @@ class Wish
<?= $this->getCardImage() ?>
<div class="content">
<?php if ($this->title) { ?>
<?php if ($this->title || $this->priority) { ?>
<?= $this->getCardContentHeader() ?>
<?php } ?>