aboutsummaryrefslogtreecommitdiff
path: root/actions/user/spotlight.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/user/spotlight.php')
-rw-r--r--actions/user/spotlight.php34
1 files changed, 19 insertions, 15 deletions
diff --git a/actions/user/spotlight.php b/actions/user/spotlight.php
index b43af2f16..202dde387 100644
--- a/actions/user/spotlight.php
+++ b/actions/user/spotlight.php
@@ -1,15 +1,19 @@
-<?php
-
- gatekeeper();
-
- $closed = get_input('closed','true');
- if ($closed != 'true') {
- $closed = false;
- } else {
- $closed = true;
- }
-
- $_SESSION['user']->spotlightclosed = $closed;
- exit;
-
-?> \ No newline at end of file
+<?php
+/**
+ * Close or open spotlight.
+ *
+ * @package Elgg.Core
+ * @subpackage Spotlight
+ * @todo This is deprecated in 1.8
+ */
+
+$closed = get_input('closed', 'true');
+if ($closed != 'true') {
+ $closed = false;
+} else {
+ $closed = true;
+}
+
+elgg_get_logged_in_user_entity()->spotlightclosed = $closed;
+// exit as this action is called through Ajax
+exit; \ No newline at end of file