Documents and Documentation (beta 1) (#23)

- Change to SQLite document store
- Complete documentation on usage of Feed Reader Central
- Update INSTALLING.md for new installation procedures

Reviewed-on: #23
This commit was merged in pull request #23.
This commit is contained in:
2024-06-12 02:07:35 +00:00
parent 819979f2b2
commit 0c87392910
43 changed files with 1652 additions and 1142 deletions

View File

@@ -1,17 +1,19 @@
<?php
<?php declare(strict_types=1);
/**
* Home Page
*
* Displays a list of unread or bookmarked items for the current user
*/
use FeedReaderCentral\{Feed, ItemList};
include '../start.php';
$db = Data::getConnection();
Security::verifyUser($db);
FeedReaderCentral\Security::verifyUser();
if (key_exists('refresh', $_GET)) {
$refreshResult = Feed::refreshAll($db);
$refreshResult = Feed::refreshAll();
if (key_exists('ok', $refreshResult)) {
add_info('All feeds refreshed successfully');
} else {
@@ -20,8 +22,8 @@ if (key_exists('refresh', $_GET)) {
}
$list = match (true) {
key_exists('bookmarked', $_GET) => ItemList::allBookmarked($db),
default => ItemList::allUnread($db)
key_exists('bookmarked', $_GET) => ItemList::allBookmarked(),
default => ItemList::allUnread()
};
$title = "Your $list->itemType Items";
@@ -34,4 +36,3 @@ if ($list->itemType == 'Unread') {
echo '</h1>';
$list->render();
page_foot();
$db->close();