aboutsummaryrefslogtreecommitdiff
path: root/views/default/scripts
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-15 02:40:42 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-15 02:40:42 +0000
commitb9ffc51a110107be82cb1151acd9c7cd07f55ab1 (patch)
treef615b901c0d5a9f4cf3e54cf502c9e4211f3ff8c /views/default/scripts
parent6a755e4c0eec763d3f62aa98e35057ceff373121 (diff)
downloadelgg-b9ffc51a110107be82cb1151acd9c7cd07f55ab1.tar.gz
elgg-b9ffc51a110107be82cb1151acd9c7cd07f55ab1.tar.bz2
last step in conversion to elgg.js
git-svn-id: http://code.elgg.org/elgg/trunk@7628 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/scripts')
-rw-r--r--views/default/scripts/initialize_elgg.php45
1 files changed, 0 insertions, 45 deletions
diff --git a/views/default/scripts/initialize_elgg.php b/views/default/scripts/initialize_elgg.php
deleted file mode 100644
index 03d5adc5a..000000000
--- a/views/default/scripts/initialize_elgg.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-/**
- *
- */
-
-?>
-<script type="text/javascript">
-/**
- * Don't want to cache these -- they could change for every request
- */
-elgg.config.lastcache = <?php echo (int)($vars['config']->lastcache); ?>;
-
-elgg.security.token.__elgg_ts = <?php echo $ts = time(); ?>;
-elgg.security.token.__elgg_token = '<?php echo generate_action_token($ts); ?>';
-
-<?php
-$page_owner = elgg_get_page_owner();
-
-if ($page_owner instanceof ElggEntity) {
- $page_owner_json = array();
- foreach ($page_owner->getExportableValues() as $v) {
- $page_owner_json[$v] = $page_owner->$v;
- }
-
- $page_owner_json['subtype'] = $page_owner->getSubtype();
- $page_owner_json['url'] = $page_owner->getURL();
-
- echo 'elgg.page_owner = '.json_encode($page_owner_json).';';
-}
-
-$user = get_loggedin_user();
-
-if ($user instanceof ElggUser) {
- $user_json = array();
- foreach ($user->getExportableValues() as $v) {
- $user_json[$v] = $user->$v;
- }
-
- $user_json['subtype'] = $user->getSubtype();
- $user_json['url'] = $user->getURL();
-
- echo 'elgg.session.user = new elgg.ElggUser('.json_encode($user_json).');';
-}
-?>;
-</script> \ No newline at end of file