Fix token issue when saving scratchpad

This commit is contained in:
2026-01-09 09:44:08 +01:00
parent 6328523624
commit a704640ebc
2 changed files with 24 additions and 2 deletions

View File

@@ -114,6 +114,11 @@ class syntax_plugin_luxtools_scratchpad extends SyntaxPlugin
/** @var Doku_Renderer_xhtml $renderer */
$endpoint = DOKU_BASE . 'lib/plugins/luxtools/scratchpad.php';
$sectok = '';
if (function_exists('getSecurityToken')) {
$sectok = (string)getSecurityToken();
}
global $ID;
$pageId = (string)$ID;
$canEdit = function_exists('auth_quickaclcheck') ? (auth_quickaclcheck($pageId) >= AUTH_EDIT) : false;
@@ -123,6 +128,7 @@ class syntax_plugin_luxtools_scratchpad extends SyntaxPlugin
. ' data-endpoint="' . hsc($endpoint) . '"'
. ' data-pad="' . hsc($rawPad) . '"'
. ' data-pageid="' . hsc($pageId) . '"'
. ' data-sectok="' . hsc($sectok) . '"'
. '>';
$renderer->doc .= '<div class="luxtools-scratchpad-bar">';