]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Refs #4764. Also checking $_SESSION['last_forward_from'] for twitter forwarding.
authorBrett Profitt <brett.profitt@gmail.com>
Mon, 17 Dec 2012 16:58:26 +0000 (11:58 -0500)
committerBrett Profitt <brett.profitt@gmail.com>
Mon, 17 Dec 2012 16:58:26 +0000 (11:58 -0500)
mod/twitter_api/lib/twitter_api.php

index 81c9c6628ba6d59627aca6625faf1793f23506b2..e163d2b3e387e657e0a59ae076e616d35130f136 100644 (file)
@@ -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'];