fix: address code review findings for bookmark feature (H1–L5)
Fix broken tests (H1), align interface signatures with implementations (H3), remove dead code (H4), add missing input guard (M1), replace raw $_SESSION access with SessionStoreInterface (M2), sync update script schema (M4), use shared getAppBase utility (L2), document fragment stripping (L3), and apply app- CSS class prefix convention (L5). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
<?php
|
||||
|
||||
use MintyPHP\Http\SessionStoreInterface;
|
||||
use MintyPHP\Service\Bookmark\BookmarkService;
|
||||
|
||||
$bmSessionData = is_array($_SESSION['user_bookmarks'] ?? null) ? $_SESSION['user_bookmarks'] : [];
|
||||
$bmSessionData = is_array(app(SessionStoreInterface::class)->get('user_bookmarks')) ? app(SessionStoreInterface::class)->get('user_bookmarks') : [];
|
||||
$bmSessionGroups = is_array($bmSessionData['groups'] ?? null) ? $bmSessionData['groups'] : [];
|
||||
|
||||
?>
|
||||
<dialog
|
||||
data-app-bookmark-dialog
|
||||
data-app-component="bookmark-save"
|
||||
data-max-message="<?php e(t('Maximum bookmarks reached')); ?>"
|
||||
data-title-create="<?php e(t('Bookmarks')); ?>"
|
||||
data-title-edit="<?php e(t('Bookmarks')); ?>"
|
||||
|
||||
Reference in New Issue
Block a user