aboutsummaryrefslogtreecommitdiff
path: root/engine/classes
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2013-02-01 07:22:03 -0500
committerCash Costello <cash.costello@gmail.com>2013-02-01 07:22:03 -0500
commitfeed34eaf567924394bdcc0463c4d21231ad38d3 (patch)
treec9c9e4ecaaa852e269359c7e38038a7a2501e196 /engine/classes
parent6a73322353db0e17bdf86a9db8d7d3f2582740de (diff)
downloadelgg-feed34eaf567924394bdcc0463c4d21231ad38d3.tar.gz
elgg-feed34eaf567924394bdcc0463c4d21231ad38d3.tar.bz2
Fixes #5022 not setting forward on ajax calls for walled garden
Diffstat (limited to 'engine/classes')
-rw-r--r--engine/classes/ElggSite.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/engine/classes/ElggSite.php b/engine/classes/ElggSite.php
index 1fe49b85c..1a34df195 100644
--- a/engine/classes/ElggSite.php
+++ b/engine/classes/ElggSite.php
@@ -381,7 +381,9 @@ class ElggSite extends ElggEntity {
elgg_register_plugin_hook_handler('index', 'system', 'elgg_walled_garden_index', 1);
if (!$this->isPublicPage()) {
- $_SESSION['last_forward_from'] = current_page_url();
+ if (!elgg_is_xhr()) {
+ $_SESSION['last_forward_from'] = current_page_url();
+ }
register_error(elgg_echo('loggedinrequired'));
forward();
}
@@ -443,8 +445,6 @@ class ElggSite extends ElggEntity {
// include a hook for plugin authors to include public pages
$plugins = elgg_trigger_plugin_hook('public_pages', 'walled_garden', NULL, array());
- // lookup admin-specific public pages
-
// allow public pages
foreach (array_merge($defaults, $plugins) as $public) {
$pattern = "`^{$CONFIG->url}$public/*$`i";