From 8de36b13dd9a80161fe8ba593fc85c7e911985b6 Mon Sep 17 00:00:00 2001 From: notfire Date: Mon, 9 Dec 2024 18:06:25 -0500 Subject: [PATCH] hopeufl --- admin/fedi.php | 4 ++-- admin/respond.php | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/admin/fedi.php b/admin/fedi.php index f407fb7..2b8c8e2 100644 --- a/admin/fedi.php +++ b/admin/fedi.php @@ -21,10 +21,10 @@ $contentR = $arr["responsetext"]; if ($arr["iscwed"] == "t") { $contentCW = $arr["cw"]; curl_setopt($ch, CURLOPT_POSTFIELDS, - http_build_query(array('status' => "question: {$contentO}\nresponse: {$contentR}", 'visibility' => "{$fediVisibility}", 'spoiler_text' => "anonymous question response (automated); cw: {$contentCW}"))); + http_build_query(array('status' => "question: {$contentO}\n\nresponse: {$contentR}", 'visibility' => "{$fediVisibility}", 'spoiler_text' => "anonymous question response (automated); cw: {$contentCW}"))); } else { curl_setopt($ch, CURLOPT_POSTFIELDS, - http_build_query(array('status' => "question: {$contentO}\nresponse: {$contentR}", 'visibility' => "{$fediVisibility}", 'spoiler_text' => "anonymous question response (automated)"))); + http_build_query(array('status' => "question: {$contentO}\n\nresponse: {$contentR}", 'visibility' => "{$fediVisibility}", 'spoiler_text' => "anonymous question response (automated)"))); } curl_exec($ch); diff --git a/admin/respond.php b/admin/respond.php index 888cc7e..a68a5af 100644 --- a/admin/respond.php +++ b/admin/respond.php @@ -14,8 +14,9 @@ if ($_GET["text"] !== null) { SET \"responsetext\" = '{$text}', \"responsetime\" = timestamptz'{$cdate}', isrespondedto = True WHERE id = {$id}; "; - - pg_query($db, $query); + + pg_update($db, "data", array("responsetext" => $text, "responsetime" => "timestamptz'{$cdate}", "isrespondedto" => "True"), array("id" => $id)); + if ($fediEnabled) { include 'fedi.php';