Debug v17

This commit is contained in:
Laurent Destailleur 2023-02-21 20:51:26 +01:00
parent 1231604d14
commit 4df225a8e4

View File

@ -11276,6 +11276,22 @@ function currentToken()
return isset($_SESSION['token']) ? $_SESSION['token'] : '';
}
/**
* Return a random string to be used as a nonce value for js
*
* @return string
*/
function getNonce()
{
global $conf;
if (empty($conf->cache['nonce'])) {
$conf->cache['nonce'] = dolGetRandomBytes(8);
}
return $conf->cache['nonce'];
}
/**
* Start a table with headers and a optinal clickable number (don't forget to use "finishSimpleTable()" after the last table row)
*