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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user