From 20ccba81c45780959b2ccf261afa3186304cd819 Mon Sep 17 00:00:00 2001 From: notfire Date: Mon, 9 Dec 2024 17:55:09 -0500 Subject: [PATCH] fix cws --- admin/fedi.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/admin/fedi.php b/admin/fedi.php index 657222c..4629944 100644 --- a/admin/fedi.php +++ b/admin/fedi.php @@ -18,16 +18,16 @@ curl_setopt($ch, CURLOPT_HTTPHEADER, $contentO = $arr["text"]; $contentR = $arr["responsetext"]; -if ($arr["iscwed"]) { +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 requestion response (automated); cw: {$contentCW}"))); + http_build_query(array('status' => "question: {$contentO}\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 requestion response (automated)"))); + http_build_query(array('status' => "question: {$contentO}\nresponse: {$contentR}", 'visibility' => "{$fediVisibility}", 'spoiler_text' => "anonymous question response (automated)"))); } -curl_exec($ch); +curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_close($ch);