From 50cbe0bf0f2c04fd4db52ead61efee327cb311c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=B3th=20Rich=C3=A1rd?= Date: Tue, 6 Aug 2019 11:17:17 +0200 Subject: [PATCH] fix credit update condition --- _ajax/update_presence.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_ajax/update_presence.php b/_ajax/update_presence.php index 94e2b7d..933e733 100644 --- a/_ajax/update_presence.php +++ b/_ajax/update_presence.php @@ -16,7 +16,7 @@ if (!$sql->num_of_rows($check_query) && $_POST['checked'] == "false") { $sql->insert_into('presence', array('pr_user_kid_uk_id' => $_POST['user_id'], 'pr_training_tr_id' => $_POST['tr_id'])); log::register('new_presence', 'Edzés: ' . $_POST['tr_id'] . ', gyerek: ' . $_POST['user_id'], null, $_POST['admin_id']); - if ($_POST['credited']) { + if ($_POST['credited'] == 'true') { $sql->update_table('user_kid', array('uk_credit' => $_POST['credit'] + 1), array('uk_id' => $_POST['user_id'])); } }