- changed double-quotes to single
- added some empty lines for better readability
*
* @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
case 'atom':
case 'xml':
return $this->createXML($data, $root_element);
+
case 'json':
default:
return $data;
case 'xml':
$this->setType(static::TYPE_XML);
break;
+
case 'json':
$this->setType(static::TYPE_JSON);
if (!empty($return)) {
$return = $json;
}
break;
+
case 'rss':
$this->setType(static::TYPE_RSS);
break;
+
case 'atom':
$this->setType(static::TYPE_ATOM);
break;
/**
* @param array $request
+ *
* @return void
* @throws \Exception
*/
$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();
}