diff options
author | Andreas Gohr <andi@splitbrain.org> | 2013-10-13 01:15:42 -0700 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2013-10-13 01:15:42 -0700 |
commit | 91741454336a90c489c29db782ae4708b59515c6 (patch) | |
tree | fe1cd44a749effd496d39a150fee4da8343f4d8e /lib/exe/js.php | |
parent | b0d8bc5fa3fb8530225f01864c73542edff7be1c (diff) | |
parent | df5d307ea8bac1f5030d42af363ae9f7469a63f2 (diff) | |
download | rpg-91741454336a90c489c29db782ae4708b59515c6.tar.gz rpg-91741454336a90c489c29db782ae4708b59515c6.tar.bz2 |
Merge pull request #371 from splitbrain/FS#2837cookiepath
Use in cookie a correct path, added DOKU_COOKIEPATH to js constants
Diffstat (limited to 'lib/exe/js.php')
-rw-r--r-- | lib/exe/js.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/exe/js.php b/lib/exe/js.php index 76238a81b..040b8874d 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -86,15 +86,20 @@ function js_out(){ // start output buffering and build the script ob_start(); + $json = new JSON(); // add some global variables print "var DOKU_BASE = '".DOKU_BASE."';"; print "var DOKU_TPL = '".tpl_basedir()."';"; + print "var DOKU_COOKIE_PARAM = " . $json->encode( + array( + 'path' => empty($conf['cookiedir']) ? DOKU_REL : $conf['cookiedir'], + 'secure' => $conf['securecookie'] && is_ssl() + )).";"; // FIXME: Move those to JSINFO print "var DOKU_UHN = ".((int) useHeading('navigation')).";"; print "var DOKU_UHC = ".((int) useHeading('content')).";"; // load JS specific translations - $json = new JSON(); $lang['js']['plugins'] = js_pluginstrings(); $templatestrings = js_templatestrings(); if(!empty($templatestrings)) { |