1
0
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:
trendschau
2025-05-31 21:20:51 +02:00
parent 571b23d7ab
commit 367c8d5f46
4 changed files with 9 additions and 10 deletions

2
cache/timer.yaml vendored
View File

@@ -1 +1 @@
licenseupdate: 1748376533
licenseupdate: 1748718958

View File

@@ -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

View File

@@ -1,4 +1,4 @@
version: '2.17.2'
version: '2.17.3'
title: 'Typemill'
author: 'Unknown'
copyright: false

View File

@@ -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']);