mirror of
https://github.com/UnickSoft/graphonline.git
synced 2026-02-16 02:30:51 +00:00
Change script location.
Split js code. Added cache and changed loading mechanism for js sources.
This commit is contained in:
@@ -173,11 +173,15 @@
|
||||
return SITE_ROOT . "{$dir}{$uri}";
|
||||
}
|
||||
|
||||
function RootCacheJS($uri = '', $version = '') {
|
||||
function RootCacheJS($uri = '') {
|
||||
global $g_config;
|
||||
|
||||
return Root(($g_config['use_js_cache'] ? $uri . ".cache" :
|
||||
$uri) . "?v=" . $version);
|
||||
|
||||
$cacheFilePath = Root($uri . ".cache");
|
||||
$filePath = Root($uri);
|
||||
$cacheExists = file_exists("." . $cacheFilePath);
|
||||
$finalFileName = $cacheExists && $g_config['use_js_cache'] ? $cacheFilePath : $filePath;
|
||||
|
||||
return $finalFileName . "?v=" . $g_config['engine_version'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user