diff options
author | Dominik Eckelmann <deckelmann@gmail.com> | 2012-03-14 12:52:36 +0100 |
---|---|---|
committer | Dominik Eckelmann <deckelmann@gmail.com> | 2012-03-14 12:52:36 +0100 |
commit | 3a6d76070be7220b8e5f7c04443aa923bc8cddf2 (patch) | |
tree | dfd00b5d0c5f58ee313eb376a8cb1ee99512bf83 /lib/exe/js.php | |
parent | 03d7247e047c21d2733f837148a1499f56784ae3 (diff) | |
parent | d0caa5642f6e322a026bd5bdac4585ff1b2f40da (diff) | |
download | rpg-3a6d76070be7220b8e5f7c04443aa923bc8cddf2.tar.gz rpg-3a6d76070be7220b8e5f7c04443aa923bc8cddf2.tar.bz2 |
Merge branch 'master' of https://github.com/splitbrain/dokuwiki
Conflicts:
lib/exe/xmlrpc.php
Diffstat (limited to 'lib/exe/js.php')
-rw-r--r-- | lib/exe/js.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/exe/js.php b/lib/exe/js.php index b7f2fd222..4b72014b2 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -32,8 +32,8 @@ function js_out(){ global $config_cascade; // The generated script depends on some dynamic options - $cache = new cache('scripts'.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'], - '.js'); + $cache = new cache('scripts'.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'],'.js'); + $cache->_event = 'JS_CACHE_USE'; // load minified version for some files $min = $conf['compress'] ? '.min' : ''; @@ -65,7 +65,7 @@ function js_out(){ # disabled for FS#1958 DOKU_INC.'lib/scripts/hotkeys.js', DOKU_INC.'lib/scripts/behaviour.js', DOKU_INC.'lib/scripts/page.js', - DOKU_TPLINC.'script.js', + tpl_incdir().'script.js', ); // add possible plugin scripts and userscript @@ -79,15 +79,15 @@ function js_out(){ // check cache age & handle conditional request // This may exit if a cache can be used - http_cached($cache->cache, - $cache->useCache(array('files' => $cache_files))); + $cache_ok = $cache->useCache(array('files' => $cache_files)); + http_cached($cache->cache, $cache_ok); // start output buffering and build the script ob_start(); // add some global variables print "var DOKU_BASE = '".DOKU_BASE."';"; - print "var DOKU_TPL = '".DOKU_TPL."';"; + print "var DOKU_TPL = '".tpl_basedir()."';"; // FIXME: Move those to JSINFO print "var DOKU_UHN = ".((int) useHeading('navigation')).";"; print "var DOKU_UHC = ".((int) useHeading('content')).";"; |