diff options
Diffstat (limited to 'inc/functions.php')
| -rwxr-xr-x | inc/functions.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/inc/functions.php b/inc/functions.php index 515e3e55..cd1f8fde 100755 --- a/inc/functions.php +++ b/inc/functions.php @@ -13,6 +13,7 @@ define('TINYBOARD', null); $microtime_start = microtime(true); +require_once 'inc/cache.php'; require_once 'inc/display.php'; require_once 'inc/template.php'; require_once 'inc/database.php'; @@ -63,7 +64,6 @@ function loadConfig() { require_once('tmp/cache/cache_config.php'); } - if (isset($config['cache_config']) && $config['cache_config'] && $config = Cache::get('config_' . $boardsuffix ) ) { @@ -106,6 +106,7 @@ function loadConfig() { 'file_icons', 'footer', 'stylesheets', + 'code_stylesheets', 'additional_javascript', 'markup', 'custom_pages', @@ -1678,9 +1679,17 @@ function buildJavascript() { 'uri' => addslashes((!empty($uri) ? $config['uri_stylesheets'] : '') . $uri)); } + $code_stylesheets = array(); + foreach ($config['code_stylesheets'] as $name => $uri) { + $code_stylesheets[] = array( + 'name' => addslashes($name), + 'uri' => addslashes((!empty($uri) ? $config['uri_stylesheets'] : '') . $uri)); + } + $script = Element('main.js', array( 'config' => $config, - 'stylesheets' => $stylesheets + 'stylesheets' => $stylesheets, + 'code_stylesheets' => $code_stylesheets )); // Check if we have translation for the javascripts; if yes, we add it to additional javascripts |
