1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-09-02 20:52:44 +02:00

feat: introduce template engine (#2899)

This commit is contained in:
Dag
2022-07-08 14:17:25 +02:00
committed by GitHub
parent 951092eef3
commit abfc6b4633
9 changed files with 92 additions and 20 deletions

View File

@@ -63,7 +63,7 @@ class DisplayAction implements ActionInterface
unset($this->userData['_cache_timeout']);
$uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) . '?' . http_build_query($this->userData);
header('Location: ' . $uri, true, 301);
die();
exit;
}
$cache_timeout = filter_var($this->userData['_cache_timeout'], FILTER_VALIDATE_INT);
@@ -126,7 +126,7 @@ class DisplayAction implements ActionInterface
if ($mtime <= $stime) { // Cached data is older or same
header('Last-Modified: ' . gmdate('D, d M Y H:i:s ', $mtime) . 'GMT', true, 304);
die();
exit;
}
}
@@ -193,7 +193,9 @@ class DisplayAction implements ActionInterface
$items[] = $item;
} elseif (Configuration::getConfig('error', 'output') === 'http') {
header('Content-Type: text/html', true, $this->getReturnCode($e));
die(buildTransformException($e, $bridge));
$response = buildTransformException($e, $bridge);
print $response;
exit;
}
}
}
@@ -224,7 +226,9 @@ class DisplayAction implements ActionInterface
} catch (\Throwable $e) {
error_log($e);
header('Content-Type: text/html', true, $e->getCode());
die(buildTransformException($e, $bridge));
$response = buildTransformException($e, $bridge);
print $response;
exit;
}
}
}