summaryrefslogtreecommitdiff
path: root/lib/exe/js.php
diff options
context:
space:
mode:
authorAnika Henke <anika@selfthinker.org>2013-11-02 13:10:14 +0000
committerAnika Henke <anika@selfthinker.org>2013-11-02 13:10:14 +0000
commitc5393ecb1aa570830d21e9dc95b4c21cd9aa9c01 (patch)
tree96e8dc34468a325596a5f94c85e38374fbc4b9ba /lib/exe/js.php
parent71c1143e8785954ea00a62aeb755ca7d8fa47e56 (diff)
parent38d74b12176722ce52dc1905c13816a78a2551ee (diff)
downloadrpg-c5393ecb1aa570830d21e9dc95b4c21cd9aa9c01.tar.gz
rpg-c5393ecb1aa570830d21e9dc95b4c21cd9aa9c01.tar.bz2
Merge remote-tracking branch 'origin/master' into video-audio
Conflicts: inc/parser/xhtml.php
Diffstat (limited to 'lib/exe/js.php')
-rw-r--r--lib/exe/js.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/exe/js.php b/lib/exe/js.php
index 4b4b598de..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)) {
@@ -194,8 +199,7 @@ function js_pluginscripts(){
*
* @author Gabriel Birke <birke@d-scribe.de>
*/
-function js_pluginstrings()
-{
+function js_pluginstrings() {
global $conf;
$pluginstrings = array();
$plugins = plugin_list();