From feed34eaf567924394bdcc0463c4d21231ad38d3 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Fri, 1 Feb 2013 07:22:03 -0500 Subject: Fixes #5022 not setting forward on ajax calls for walled garden --- engine/classes/ElggSite.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engine') 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"; -- cgit v1.2.3