Add feed refresh link (#5)

- Feed updates and refresh use the same logic
- Fixed issue with logic around item add-or-update
This commit is contained in:
2024-04-13 22:32:39 -04:00
parent ee86eeef13
commit 77d628ed69
3 changed files with 117 additions and 65 deletions

View File

@@ -1,6 +1,8 @@
<?php
use JetBrains\PhpStorm\NoReturn;
spl_autoload_register(function ($class) {
$file = implode(DIRECTORY_SEPARATOR, [ __DIR__, 'lib', "$class.php" ]);
$file = implode(DIRECTORY_SEPARATOR, [__DIR__, 'lib', "$class.php"]);
if (file_exists($file)) {
require $file;
return true;
@@ -86,7 +88,8 @@ function page_foot(): void {
*
* @param string $value A local URL to which the user should be redirected
*/
function frc_redirect(string $value) {
#[NoReturn]
function frc_redirect(string $value): void {
if (str_starts_with($value, 'http')) {
http_response_code(400);
die();