mirror of
https://github.com/typemill/typemill.git
synced 2025-07-25 00:02:28 +02:00
Fix session segments initialization
This commit is contained in:
2
cache/timer.yaml
vendored
2
cache/timer.yaml
vendored
@@ -1 +1 @@
|
||||
licenseupdate: 1748376533
|
||||
licenseupdate: 1748718958
|
||||
|
@@ -5,7 +5,8 @@ meta:
|
||||
heroimage: ''
|
||||
owner: trendschau
|
||||
author: 'Sebastian Schürmanns'
|
||||
modified: '2025-05-07'
|
||||
allowedrole: member
|
||||
modified: '2025-05-17'
|
||||
created: '2024-04-25'
|
||||
time: 17-24-48
|
||||
hide: false
|
||||
|
@@ -1,4 +1,4 @@
|
||||
version: '2.17.2'
|
||||
version: '2.17.3'
|
||||
title: 'Typemill'
|
||||
author: 'Unknown'
|
||||
copyright: false
|
||||
|
@@ -263,20 +263,18 @@ $timer['permissions'] = microtime(true);
|
||||
* SEGMENTS WITH SESSION *
|
||||
****************************/
|
||||
|
||||
$session_segments = ['setup', 'tm/', 'api/'];
|
||||
|
||||
# if website is restricted to registered user
|
||||
if( ( isset($settings['access']) && $settings['access'] ) || ( isset($settings['pageaccess']) && $settings['pageaccess'] ) )
|
||||
{
|
||||
# activate session for all routes
|
||||
$session_segments = [$urlinfo['route']];
|
||||
}
|
||||
else
|
||||
{
|
||||
$session_segments = ['setup', 'tm/', 'api/'];
|
||||
|
||||
# let plugins add own segments for session, eg. to enable csrf for forms
|
||||
$client_segments = $dispatcher->dispatch(new OnSessionSegmentsLoaded([]), 'onSessionSegmentsLoaded')->getData();
|
||||
$session_segments = array_merge($session_segments, $client_segments);
|
||||
}
|
||||
# let plugins add own segments for session, eg. to enable csrf for forms
|
||||
$client_segments = $dispatcher->dispatch(new OnSessionSegmentsLoaded([]), 'onSessionSegmentsLoaded')->getData();
|
||||
$session_segments = array_merge($session_segments, $client_segments);
|
||||
|
||||
# start session
|
||||
# Session::startSessionForSegments($session_segments, $urlinfo['route']);
|
||||
|
Reference in New Issue
Block a user