diff --git a/core/config/main.php b/core/config/main.php index 1908941..08f03f5 100755 --- a/core/config/main.php +++ b/core/config/main.php @@ -92,4 +92,5 @@ $g_config['donateTransactions'] = "./tmp/donate/transactions.txt"; $g_config['vote'] = "./tmp/vote/vote.txt"; $g_config['voteTopics'] = "./tmp/vote/voteTopics.txt_"; + $g_config['use_js_cache'] = true; ?> diff --git a/core/func/main.php b/core/func/main.php index 7a240d9..6d70b58 100755 --- a/core/func/main.php +++ b/core/func/main.php @@ -173,6 +173,13 @@ return SITE_ROOT . "{$dir}{$uri}"; } + function RootCacheJS($uri = '', $version = '') { + global $g_config; + + return Root(($g_config['use_js_cache'] ? $uri . ".cache" : + $uri) . "?v=" . $version); + } + /** * Путь до корня сайта с подставкой языка, нужна для ссылок */