From 8c305d8a931f745cfc3bff8249607036bffecb76 Mon Sep 17 00:00:00 2001 From: jhuesser Date: Thu, 7 Jun 2018 11:29:28 +0200 Subject: [PATCH] bug fixes and debuging stuff removed --- classes/incident.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/classes/incident.php b/classes/incident.php index 19f5e73..b1d4f62 100644 --- a/classes/incident.php +++ b/classes/incident.php @@ -162,7 +162,7 @@ class Incident implements JsonSerializable $query = $mysqli->query("SELECT * FROM services_subscriber WHERE serviceIDFK=" . $service); while($subscriber = $query->fetch_assoc()){ - $subscriberQuery = $mysqli->query("SELECT * FROM subscribers WHERE userID=" . $subscriber['userIDFK']); + $subscriberQuery = $mysqli->query("SELECT * FROM subscribers WHERE subscriberID=" . $subscriber['subscriberIDFK']); while($subscriberData = $subscriberQuery->fetch_assoc()){ $telegramID = $subscriberData['telegramID']; $firstname = $subscriberData['firstname']; @@ -170,14 +170,14 @@ class Incident implements JsonSerializable $tg_message = urlencode('Hi ' . $firstname . chr(10) . 'There is a status update on a service that you have subscribed. View online'); $response = json_decode(file_get_contents("https://api.telegram.org/bot" . TG_BOT_API_TOKEN . "/sendMessage?chat_id=" . $telegramID . "&parse_mode=HTML&text=" . $tg_message)); - + print_r($response); } } - // header("Location: ".WEB_URL."/admin"); + header("Location: ".WEB_URL."/admin"); } } - + } /** * Renders incident