diff --git a/design/privateheader.php b/design/privateheader.php index 6d3b793..5667c2f 100755 --- a/design/privateheader.php +++ b/design/privateheader.php @@ -60,30 +60,24 @@ if ($UseTooltipster) { ?> - - - - + - + get_value("script_stats_$Script")) === false || $ScriptStats['mtime'] != filemtime(STATIC_SERVER."functions/$Script.js")) { + $ScriptStats['mtime'] = filemtime(STATIC_SERVER."functions/$Script.js"); + $ScriptStats['hash'] = base64_encode(hash_file(INTEGRITY_ALGO, STATIC_SERVER."functions/$Script.js", true)); + $ScriptStats['algo'] = INTEGRITY_ALGO; + G::$Cache->cache_value("script_stats_$Script", $ScriptStats); + } ?> - - - + - - - - - - - +get_value("script_stats_$Script")) === false || $ScriptStats['mtime'] != filemtime(STATIC_SERVER."functions/$Script.js")) { + $ScriptStats['mtime'] = filemtime(STATIC_SERVER."functions/$Script.js"); + $ScriptStats['hash'] = base64_encode(hash_file(INTEGRITY_ALGO, STATIC_SERVER."functions/$Script.js", true)); + $ScriptStats['algo'] = INTEGRITY_ALGO; + G::$Cache->cache_value("script_stats_$Script", $ScriptStats); + } +?> + +