16 Commits

Author SHA1 Message Date
9e8c70ada2 Merge branch 'main' into doc-experiment 2024-06-11 22:05:59 -04:00
43ab5b5581 Add server configs; update INSTALL verbiage 2024-06-11 21:58:27 -04:00
3cafb318dc Use auto IDs; drop to PHP 8.2 2024-06-11 21:03:27 -04:00
08fd589481 Add distro create script 2024-06-09 21:27:49 -04:00
3dc314b2e3 Fix insert statements; other minor tweaks 2024-06-09 18:01:04 -04:00
edc9a218b7 Fix doc update-by-ID problem
- Rework imports for pages
- Ready for final end-to-end test before merge
2024-06-08 13:34:14 -04:00
efa69f2c1c Remove direct PDO handling 2024-06-08 11:24:09 -04:00
3a31aca467 Convert @ to : in parameter names
- Still more to do; possible connection exhaustion
2024-06-04 22:52:12 -04:00
7231a95fca Change to PDODocument library 2024-06-04 19:56:06 -04:00
1ca7dbdedd Tweaks to document access 2024-06-03 18:18:51 -04:00
93dd8e880f First cut of item-with-feed and list impl
- Add strict types to all files
- Convert many queries to document commands
2024-06-02 22:14:19 -04:00
b88ad1f268 Add table to doc util script
- Remove db parameter from several places
- Add constructors for document types
2024-06-01 23:17:29 -04:00
610ab67475 Move domain items up to lib
- WIP on converting more complex queries
2024-05-31 22:57:24 -04:00
f7f5dba795 Split out feed parsing from document
WIP - still moving things around...
2024-05-31 16:00:04 -04:00
67747899ac WIP on document conversion 2024-05-31 14:06:08 -04:00
df20936af2 WIP on document conversion 2024-05-30 21:58:54 -04:00
3 changed files with 4 additions and 4 deletions

View File

@@ -4,7 +4,7 @@ use BitBadger\PDODocument\{AutoId, Configuration};
use FeedReaderCentral\Data;
/** The current Feed Reader Central version */
const FRC_VERSION = '1.0.0-beta3';
const FRC_VERSION = '1.0.0-beta1';
/**
* Drop .0 or .0.0 from the end of the version to format it for display

View File

@@ -34,7 +34,7 @@ function refresh_all(): void
{
try {
$users = [];
foreach (Feed::retrieveAll()->items() as /** @var Feed $feed */ $feed) {
iterator_apply(Feed::retrieveAll()->items(), function (Feed $feed) use (&$users) {
$result = Feed::refreshFeed($feed->id, $feed->url);
$userKey = "$feed->user_id";
if (!key_exists($userKey, $users)) $users[$userKey] = Find::byId(Table::USER, $feed->user_id, User::class);
@@ -44,7 +44,7 @@ function refresh_all(): void
} else {
printfn('OK (%s) %s', $users[$userKey]->email, $feed->url);
}
}
});
printfn(PHP_EOL . 'All feeds refreshed');
} catch (DocumentException $ex) {
printfn("ERR $ex");

View File

@@ -172,7 +172,7 @@ function delete_user(string $email): void
}
try {
$fields = [Field::EQ('user_id', $user->id, ':user')];
$fields = [Field::EQ('user_id', $user->id, '@user')];
Custom::nonQuery(
'DELETE FROM ' . Table::ITEM . " WHERE data->>'feed_id' IN (SELECT data->>'id' FROM " . Table::FEED
. ' WHERE ' . Query::whereByFields($fields) . ')', Parameters::addFields($fields, []));