Completed result/option migration

- Change casing on exposed constants
- Add file-level phpdoc
This commit is contained in:
2024-07-25 21:14:57 -04:00
parent 1d5a3c1c7a
commit 6dc264d34c
34 changed files with 658 additions and 383 deletions

View File

@@ -1,11 +1,15 @@
<?php declare(strict_types=1);
<?php
/**
* Bookmark Partial Handler
*
* This will display a button which will either add or remove a bookmark for a given item.
*
* @author Daniel J. Summers <daniel@bitbadger.solutions>
* @license MIT
*/
declare(strict_types=1);
use BitBadger\PDODocument\{DocumentException, Patch};
use FeedReaderCentral\{ItemWithFeed, Table};
@@ -24,7 +28,7 @@ if (key_exists('action', $_GET)) {
};
if (isset($flag)) {
try {
Patch::byId(Table::ITEM, $id, ['is_bookmarked' => $flag]);
Patch::byId(Table::Item, $id, ['is_bookmarked' => $flag]);
$item->is_bookmarked = $flag;
} catch (DocumentException $ex) {
add_error("$ex");