From 7f2faec632f8c0233d579fc5361d7f2a2bdf36c2 Mon Sep 17 00:00:00 2001 From: notfire Date: Mon, 9 Dec 2024 18:12:23 -0500 Subject: [PATCH] ok now all messages back should work fine --- TODO.md | 3 +-- admin/respond.php | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/TODO.md b/TODO.md index 5e8b63e..a751cb8 100644 --- a/TODO.md +++ b/TODO.md @@ -1,4 +1,3 @@ - modifying whether a cw is used or not? - POSSIBLY editing messages / changing their visibility? idk -- some way to automatically get notified -- some way to automatically post to fedi on response \ No newline at end of file +- some way to automatically get notified \ No newline at end of file diff --git a/admin/respond.php b/admin/respond.php index a68a5af..16b20b0 100644 --- a/admin/respond.php +++ b/admin/respond.php @@ -11,12 +11,13 @@ if ($_GET["text"] !== null) { $cdate = date("Y-m-d H:i:sP"); $query = " UPDATE data - SET \"responsetext\" = '{$text}', \"responsetime\" = timestamptz'{$cdate}', isrespondedto = True + SET \"responsetime\" = timestamptz'{$cdate}', isrespondedto = True WHERE id = {$id}; "; - pg_update($db, "data", array("responsetext" => $text, "responsetime" => "timestamptz'{$cdate}", "isrespondedto" => "True"), array("id" => $id)); + pg_query($db, $query); + pg_update($db, "data", array("responsetext" => $text), array("id" => $id)); if ($fediEnabled) { include 'fedi.php';