mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-05-16 00:11:35 +00:00
Allow to show recently submitted pages, and create them from the page
This commit is contained in:
parent
e33c13ecfa
commit
91a6a26746
4 changed files with 58 additions and 3 deletions
|
|
@ -63,7 +63,7 @@ class SubmittedPageStorage
|
|||
$session->get(self::SESSION_KEY, []),
|
||||
static fn(string $u): bool => $u !== $page->token,
|
||||
));
|
||||
array_unshift($tokens, $page->url);
|
||||
array_unshift($tokens, $page->token);
|
||||
$session->set(self::SESSION_KEY, array_slice($tokens, 0, self::MAX_RECENT));
|
||||
|
||||
return $page->token;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue