aboutsummaryrefslogtreecommitdiff
path: root/views/default/js/initialize_elgg.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/js/initialize_elgg.php')
-rw-r--r--views/default/js/initialize_elgg.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/views/default/js/initialize_elgg.php b/views/default/js/initialize_elgg.php
index cdadd4d32..b45c33463 100644
--- a/views/default/js/initialize_elgg.php
+++ b/views/default/js/initialize_elgg.php
@@ -3,13 +3,14 @@
* Initialize Elgg's js lib with the uncacheable data
*/
+if (0) { ?><script><?php }
?>
/**
* Don't want to cache these -- they could change for every request
*/
elgg.config.lastcache = <?php echo (int)elgg_get_config('lastcache'); ?>;
elgg.config.viewtype = '<?php echo elgg_get_viewtype(); ?>';
-elgg.config.simplecache_enabled = <?php echo elgg_is_simplecache_enabled(); ?>;
+elgg.config.simplecache_enabled = <?php echo (int)elgg_is_simplecache_enabled(); ?>;
elgg.security.token.__elgg_ts = <?php echo $ts = time(); ?>;
elgg.security.token.__elgg_token = '<?php echo generate_action_token($ts); ?>';
@@ -41,6 +42,7 @@ if ($user instanceof ElggUser) {
$user_json['subtype'] = $user->getSubtype();
$user_json['url'] = $user->getURL();
+ $user_json['admin'] = $user->isAdmin();
echo 'elgg.session.user = new elgg.ElggUser(' . json_encode($user_json) . ');';
}