aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrett Profitt <brett.profitt@gmail.com>2012-12-17 11:58:26 -0500
committerBrett Profitt <brett.profitt@gmail.com>2012-12-17 11:58:26 -0500
commitd809ded90fb5213f1a7ec59c776f92ea654454d6 (patch)
treefc9b8b7a8040ab1ed98e2b9cda558c334b866b96
parentef351d0cf8a866cb40285e71fe5ed2b980bd11ed (diff)
downloadelgg-d809ded90fb5213f1a7ec59c776f92ea654454d6.tar.gz
elgg-d809ded90fb5213f1a7ec59c776f92ea654454d6.tar.bz2
Refs #4764. Also checking $_SESSION['last_forward_from'] for twitter forwarding.
-rw-r--r--mod/twitter_api/lib/twitter_api.php4
1 files changed, 3 insertions, 1 deletions
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'];