- changed double-quotes to single
- added some empty lines for better readability
This commit is contained in:
Roland Häder 2022-08-13 23:30:57 +02:00
parent d0a011f049
commit b3906326a4
No known key found for this signature in database
GPG Key ID: C82EDE5DDFA0BA77
2 changed files with 7 additions and 1 deletions

View File

@ -107,6 +107,7 @@ class ApiResponse extends Response
* *
* @param array $arr Array to be passed to template * @param array $arr Array to be passed to template
* @param int $cid Contact ID of template * @param int $cid Contact ID of template
*
* @return array * @return array
*/ */
private function addRSSValues(array $arr, int $cid): array private function addRSSValues(array $arr, int $cid): array
@ -149,6 +150,7 @@ class ApiResponse extends Response
case 'atom': case 'atom':
case 'xml': case 'xml':
return $this->createXML($data, $root_element); return $this->createXML($data, $root_element);
case 'json': case 'json':
default: default:
return $data; return $data;
@ -219,6 +221,7 @@ class ApiResponse extends Response
case 'xml': case 'xml':
$this->setType(static::TYPE_XML); $this->setType(static::TYPE_XML);
break; break;
case 'json': case 'json':
$this->setType(static::TYPE_JSON); $this->setType(static::TYPE_JSON);
if (!empty($return)) { if (!empty($return)) {
@ -229,9 +232,11 @@ class ApiResponse extends Response
$return = $json; $return = $json;
} }
break; break;
case 'rss': case 'rss':
$this->setType(static::TYPE_RSS); $this->setType(static::TYPE_RSS);
break; break;
case 'atom': case 'atom':
$this->setType(static::TYPE_ATOM); $this->setType(static::TYPE_ATOM);
break; break;

View File

@ -43,6 +43,7 @@ class Download extends \Friendica\BaseModule
/** /**
* @param array $request * @param array $request
*
* @return void * @return void
* @throws \Exception * @throws \Exception
*/ */
@ -52,7 +53,7 @@ class Download extends \Friendica\BaseModule
$etag = 'W/"' . $hash . '"'; $etag = 'W/"' . $hash . '"';
if (trim($_SERVER['HTTP_IF_NONE_MATCH'] ?? '') == $etag) { if (trim($_SERVER['HTTP_IF_NONE_MATCH'] ?? '') == $etag) {
header("HTTP/1.1 304 Not Modified"); header('HTTP/1.1 304 Not Modified');
System::exit(); System::exit();
} }