From 5ad6aae5143c4f5894c9e1c88761c2c97906c151 Mon Sep 17 00:00:00 2001 From: Alexander Davis Date: Thu, 13 Aug 2020 21:29:38 +0100 Subject: [PATCH 1/3] :bug: Fix get open subs error (#89) Signed-off-by: Luke Tainton Co-authored-by: Luke Tainton --- app/includes/app_functions.php | 39 +++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/app/includes/app_functions.php b/app/includes/app_functions.php index 5e2e050..e6f306f 100644 --- a/app/includes/app_functions.php +++ b/app/includes/app_functions.php @@ -68,23 +68,28 @@ } function get_open_subscribed_requests($db) { - $requests = array(); - $sub_tickets_stmt = "SELECT ticket_uuid FROM ticket_subscribers WHERE user_uuid=:uuid"; - $sub_tickets_sql = $db->prepare($sub_tickets_stmt); - $sub_tickets_sql->bindParam(':uuid', $_SESSION['uuid']); - $sub_tickets_sql->execute(); - $sub_tickets_sql->setFetchMode(PDO::FETCH_ASSOC); - $sub_tickets_result = $sub_tickets_sql->fetchAll(); - foreach ($sub_tickets_result as $tkt) { - $stmt = "SELECT * FROM tickets WHERE uuid=:uuid AND status != 'Closed'"; - $sql = $db->prepare($stmt); - $sql->bindParam(':uuid', $tkt['ticket_uuid']); - $sql->execute(); - $sql->setFetchMode(PDO::FETCH_ASSOC); - $result = $sql->fetchAll(); - array_push($requests, $result[0]); - } - return $requests; + $subbed_reqs_arr = array(); + $requests = array(); + $sub_tickets_stmt = "SELECT ticket_uuid FROM ticket_subscribers WHERE user_uuid=:uuid"; + $sub_tickets_sql = $db->prepare($sub_tickets_stmt); + $sub_tickets_sql->bindParam(':uuid', $_SESSION['uuid']); + $sub_tickets_sql->execute(); + $sub_tickets_sql->setFetchMode(PDO::FETCH_ASSOC); + $sub_tickets_result = $sub_tickets_sql->fetchAll(); + foreach ($sub_tickets_result as $tkt) { + array_push($subbed_reqs_arr, $tkt['ticket_uuid']); + } + $subbed_reqs = implode(",", $subbed_reqs_arr); + $stmt = "SELECT * FROM tickets WHERE uuid IN :uuid"; + $sql = $db->prepare($stmt); + $sql->bindParam(':uuid', $subbed_reqs); + $sql->execute(); + $sql->setFetchMode(PDO::FETCH_ASSOC); + $result = $sql->fetchAll(); + foreach ($result as $sub) { + array_push($requests, $sub) + } + return $requests; } function get_request($db, $uuid) { -- 2.49.1 From bd76b093b4be88b92d7bf17e45c01855f6e60de0 Mon Sep 17 00:00:00 2001 From: Alexander Davis Date: Thu, 13 Aug 2020 23:06:26 +0100 Subject: [PATCH 2/3] Changes to branches --- .github/issue-branch.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/issue-branch.yml b/.github/issue-branch.yml index 10f1843..5df750b 100644 --- a/.github/issue-branch.yml +++ b/.github/issue-branch.yml @@ -10,4 +10,6 @@ branches: prefix: epic/ - label: type/docs prefix: docs/ + - label: type/automation + prefix: automation/ autoCloseIssue: true -- 2.49.1 From 44073f8903e32da3a6d87e24a559624511ca0c0d Mon Sep 17 00:00:00 2001 From: Luke Tainton Date: Fri, 14 Aug 2020 17:06:09 +0100 Subject: [PATCH 3/3] :chart_with_upwards_trend: Add mailing list subscription button (#92) Signed-off-by: Luke Tainton --- app/includes/footer.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/app/includes/footer.php b/app/includes/footer.php index 2b87d6b..63b70f7 100644 --- a/app/includes/footer.php +++ b/app/includes/footer.php @@ -1,11 +1,22 @@
- + + + +
+
+ + +
+ +
+
+
-- 2.49.1