From: Roland Häder Date: Sat, 13 Aug 2022 21:30:57 +0000 (+0200) Subject: Changed: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b3906326a4c46484d5afb15e154cf4eb30e42e0c;p=friendica.git Changed: - changed double-quotes to single - added some empty lines for better readability --- diff --git a/src/Module/Api/ApiResponse.php b/src/Module/Api/ApiResponse.php index 960ce3d2cb..81448769e3 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 bc3c80a255..ea07df91ab 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(); }