From 09edb7113c19b07ca11a79c2b0571f45ed2cc2eb Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 27 Jun 2010 18:44:23 +0200 Subject: use config cascade for userscripts and styles FS#1678 --- lib/exe/js.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/exe/js.php') diff --git a/lib/exe/js.php b/lib/exe/js.php index f2f9dfe6b..3756c43b9 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -29,6 +29,7 @@ if(!defined('SIMPLE_TEST')){ function js_out(){ global $conf; global $lang; + global $config_cascade; // The generated script depends on some dynamic options $cache = getCacheName('scripts'.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'],'.js'); @@ -56,7 +57,9 @@ function js_out(){ // add possible plugin scripts and userscript $files = array_merge($files,js_pluginscripts()); - $files[] = DOKU_CONF.'userscript.js'; + if(isset($config_cascade['userscript']['default'])){ + $files[] = $config_cascade['userscript']['default']; + } // check cache age & handle conditional request header('Cache-Control: public, max-age=3600'); -- cgit v1.2.3