mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 17:45:28 +00:00
update session on request update
This commit is contained in:
parent
ecbe600fe4
commit
874376bbed
2 changed files with 21 additions and 10 deletions
|
|
@ -15,6 +15,8 @@ class Request extends \Yggverse\Yoda\Abstract\Entity\Browser\Container\Page\Navb
|
||||||
$this->navbar->page->open(
|
$this->navbar->page->open(
|
||||||
$entry->get_text()
|
$entry->get_text()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$this->navbar->page->container->tab->updateSession(); // @TODO async page update
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function _onKeyRelease(
|
protected function _onKeyRelease(
|
||||||
|
|
@ -23,5 +25,7 @@ class Request extends \Yggverse\Yoda\Abstract\Entity\Browser\Container\Page\Navb
|
||||||
): void
|
): void
|
||||||
{
|
{
|
||||||
$this->navbar->refresh();
|
$this->navbar->refresh();
|
||||||
|
|
||||||
|
$this->navbar->page->container->tab->updateSession();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -219,19 +219,14 @@ class Tab
|
||||||
// Reorder entities
|
// Reorder entities
|
||||||
$this->_page = $_page;
|
$this->_page = $_page;
|
||||||
|
|
||||||
|
ksort(
|
||||||
|
$this->_page
|
||||||
|
);
|
||||||
|
|
||||||
// Update session
|
// Update session
|
||||||
if ($session)
|
if ($session)
|
||||||
{
|
{
|
||||||
$this->container->browser->database->cleanSession();
|
$this->updateSession();
|
||||||
|
|
||||||
ksort($_page);
|
|
||||||
|
|
||||||
foreach ($_page as $page)
|
|
||||||
{
|
|
||||||
$this->container->browser->database->addSession(
|
|
||||||
$page->navbar->request->getValue()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -240,4 +235,16 @@ class Tab
|
||||||
'Reorder by $page_num value not implemented'
|
'Reorder by $page_num value not implemented'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function updateSession(): void
|
||||||
|
{
|
||||||
|
$this->container->browser->database->cleanSession();
|
||||||
|
|
||||||
|
foreach ($this->_page as $page)
|
||||||
|
{
|
||||||
|
$this->container->browser->database->addSession(
|
||||||
|
$page->navbar->request->getValue()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue