summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
authorJonatas Miguel <jonatas.df.miguel@gmail.com>2012-10-25 13:19:17 +0200
committerJonatas Miguel <jonatas.df.miguel@gmail.com>2012-10-25 13:19:17 +0200
commit33b321b92b6df59cc5cf96a4f739636cdc537115 (patch)
tree787efffdebb8ae2e76fcea2811e40d504d09dd19 /system/libraries
parentf73bc3ef4ad28c13c24db6eff8adda141adef01d (diff)
parente47425844e84d54c659280c04f450a3526b4e09d (diff)
Merge branch 'develop' of git://github.com/EllisLab/CodeIgniter into develop
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/User_agent.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/system/libraries/User_agent.php b/system/libraries/User_agent.php
index ff596f04b..3387d4aa6 100644
--- a/system/libraries/User_agent.php
+++ b/system/libraries/User_agent.php
@@ -466,7 +466,13 @@ class CI_User_agent {
*/
public function is_referral()
{
- return ! empty($_SERVER['HTTP_REFERER']);
+ if (empty($_SERVER['HTTP_REFERER']))
+ {
+ return FALSE;
+ }
+
+ $referer = parse_url($_SERVER['HTTP_REFERER']);
+ return ! (empty($referer['host']) && strpos(config_item('base_url'), $referer['host']) !== FALSE);
}
// --------------------------------------------------------------------