diff options
Diffstat (limited to 'system')
-rw-r--r-- | system/core/URI.php | 6 | ||||
-rw-r--r-- | system/libraries/User_agent.php | 6 |
2 files changed, 11 insertions, 1 deletions
diff --git a/system/core/URI.php b/system/core/URI.php index 1b479e92a..c43cde005 100644 --- a/system/core/URI.php +++ b/system/core/URI.php @@ -173,6 +173,12 @@ class CI_URI { $_SERVER['QUERY_STRING'] = ''; $_GET = array(); } + + if ($uri == '/' || empty($uri)) + { + return '/'; + } + $uri = parse_url($uri, PHP_URL_PATH); // Do some final cleaning of the URI and return it diff --git a/system/libraries/User_agent.php b/system/libraries/User_agent.php index c62174836..3774fc283 100644 --- a/system/libraries/User_agent.php +++ b/system/libraries/User_agent.php @@ -375,7 +375,11 @@ class CI_User_agent { */ public function is_referral() { - return ( ! isset($_SERVER['HTTP_REFERER']) OR $_SERVER['HTTP_REFERER'] == ''); + if ( ! isset($_SERVER['HTTP_REFERER']) OR $_SERVER['HTTP_REFERER'] == '') + { + return FALSE; + } + return TRUE; } // -------------------------------------------------------------------- |