Merge pull request #13442 from fappels/9.0_newToken

Improve modulebuilder compatiblity with maintained versions.
This commit is contained in:
Laurent Destailleur 2020-03-30 19:35:45 +02:00 committed by GitHub
commit 06ad21f2e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7944,3 +7944,24 @@ function isAFileWithExecutableContent($filename)
}
return false;
}
/**
* Return the value of token currently saved into session with name 'newtoken'.
* This token must be send by any POST as it will be used by next page for comparison with value in session.
*
* @return string
*/
function newToken()
{
return $_SESSION['newtoken'];
}
/**
* Return the value of token currently saved into session with name 'token'.
*
* @return string
*/
function currentToken()
{
return $_SESSION['token'];
}