mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-06-10 12:57:13 +09:00
Refresh session when accessing admin page
This commit is contained in:
parent
1511693cf6
commit
8cfd66713c
1 changed files with 12 additions and 1 deletions
|
|
@ -210,9 +210,10 @@ class ModuleObject extends BaseObject
|
|||
return;
|
||||
}
|
||||
|
||||
// Set admin layout
|
||||
// Special treatment for admin actions
|
||||
if(preg_match('/^disp[A-Z][a-z0-9\_]+Admin/', $this->act))
|
||||
{
|
||||
// Set admin layout
|
||||
if(config('view.manager_layout') === 'admin')
|
||||
{
|
||||
$this->setLayoutPath('modules/admin/tpl');
|
||||
|
|
@ -223,6 +224,16 @@ class ModuleObject extends BaseObject
|
|||
$oTemplate = new Rhymix\Framework\Template('modules/admin/tpl', '_admin_common.html');
|
||||
$oTemplate->compile();
|
||||
}
|
||||
|
||||
// Refresh session
|
||||
if (!isset($_SESSION['RHYMIX']['admin_accessed']))
|
||||
{
|
||||
if (!headers_sent())
|
||||
{
|
||||
$_SESSION['RHYMIX']['admin_accessed'] = \RX_TIME;
|
||||
Rhymix\Framework\Session::refresh(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Execute init
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue