From d809ded90fb5213f1a7ec59c776f92ea654454d6 Mon Sep 17 00:00:00 2001 From: Brett Profitt Date: Mon, 17 Dec 2012 11:58:26 -0500 Subject: Refs #4764. Also checking $_SESSION['last_forward_from'] for twitter forwarding. --- mod/twitter_api/lib/twitter_api.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mod/twitter_api/lib') diff --git a/mod/twitter_api/lib/twitter_api.php b/mod/twitter_api/lib/twitter_api.php index 81c9c6628..e163d2b3e 100644 --- a/mod/twitter_api/lib/twitter_api.php +++ b/mod/twitter_api/lib/twitter_api.php @@ -44,7 +44,9 @@ function twitter_api_forward() { 'persistent' => (bool) get_input("persistent"), ); // capture referrer if in site, but not the twitter_api - if (!empty($_SERVER['HTTP_REFERER']) + if (!empty($SESSION['last_forward_from'])) { + $login_metadata['forward'] = $SESSION['last_forward_from']; + } elseif (!empty($_SERVER['HTTP_REFERER']) && 0 === strpos($_SERVER['HTTP_REFERER'], elgg_get_site_url()) && 0 !== strpos($_SERVER['HTTP_REFERER'], elgg_get_site_url() . 'twitter_api/')) { $login_metadata['forward'] = $_SERVER['HTTP_REFERER']; -- cgit v1.2.3