From b3906326a4c46484d5afb15e154cf4eb30e42e0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20H=C3=A4der?= Date: Sat, 13 Aug 2022 23:30:57 +0200 Subject: [PATCH] Changed: - changed double-quotes to single - added some empty lines for better readability --- src/Module/Api/ApiResponse.php | 5 +++++ src/Module/Blocklist/Domain/Download.php | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Module/Api/ApiResponse.php b/src/Module/Api/ApiResponse.php index 960ce3d2c..81448769e 100644 --- a/src/Module/Api/ApiResponse.php +++ b/src/Module/Api/ApiResponse.php @@ -107,6 +107,7 @@ class ApiResponse extends Response * * @param array $arr Array to be passed to template * @param int $cid Contact ID of template + * * @return array */ private function addRSSValues(array $arr, int $cid): array @@ -149,6 +150,7 @@ class ApiResponse extends Response case 'atom': case 'xml': return $this->createXML($data, $root_element); + case 'json': default: return $data; @@ -219,6 +221,7 @@ class ApiResponse extends Response case 'xml': $this->setType(static::TYPE_XML); break; + case 'json': $this->setType(static::TYPE_JSON); if (!empty($return)) { @@ -229,9 +232,11 @@ class ApiResponse extends Response $return = $json; } break; + case 'rss': $this->setType(static::TYPE_RSS); break; + case 'atom': $this->setType(static::TYPE_ATOM); break; diff --git a/src/Module/Blocklist/Domain/Download.php b/src/Module/Blocklist/Domain/Download.php index bc3c80a25..ea07df91a 100644 --- a/src/Module/Blocklist/Domain/Download.php +++ b/src/Module/Blocklist/Domain/Download.php @@ -43,6 +43,7 @@ class Download extends \Friendica\BaseModule /** * @param array $request + * * @return void * @throws \Exception */ @@ -52,7 +53,7 @@ class Download extends \Friendica\BaseModule $etag = 'W/"' . $hash . '"'; if (trim($_SERVER['HTTP_IF_NONE_MATCH'] ?? '') == $etag) { - header("HTTP/1.1 304 Not Modified"); + header('HTTP/1.1 304 Not Modified'); System::exit(); }