alpha1 #8

Merged
danieljsummers merged 18 commits from alpha1 into main 2024-04-15 22:48:10 +00:00
Showing only changes of commit 480228013c - Show all commits

View File

@ -25,19 +25,24 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$feedId = $isNew ? $result['ok'] : $_POST['id'];
} else {
add_error($result['error']);
$feedId = 'error';
}
}
if ($feedId == 'new') {
$feed = [ 'id' => $_GET['id'], 'url' => '' ];
$title = 'Add RSS Feed';
$feed = [ 'id' => $_GET['id'], 'url' => '' ];
} else {
$feed = Data::retrieveFeedById((int) $feedId, $db);
if (!$feed) {
http_response_code(404);
die();
}
$title = 'Edit RSS Feed';
if ($feedId == 'error') {
$feed = ['id' => $_POST['id'] ?? '', 'url' => $_POST['url'] ?? ''];
} else {
$feed = Data::retrieveFeedById((int) $feedId, $db);
if (!$feed) {
http_response_code(404);
die();
}
}
}
page_head($title); ?>