From: Brett Profitt Date: Mon, 17 Dec 2012 16:58:26 +0000 (-0500) Subject: Refs #4764. Also checking $_SESSION['last_forward_from'] for twitter forwarding. X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=d809ded90fb5213f1a7ec59c776f92ea654454d6;p=lorea%2Felgg.git Refs #4764. Also checking $_SESSION['last_forward_from'] for twitter forwarding. --- 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'];