Completed result/option migration
- Change casing on exposed constants - Add file-level phpdoc
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user