Fix token issue when saving scratchpad
This commit is contained in:
@@ -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">';
|
||||
|
||||
Reference in New Issue
Block a user