- 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 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;

View File

@ -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();
}