diff options
Diffstat (limited to 'system')
-rw-r--r-- | system/helpers/url_helper.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php index e82a51dcc..fbb4a1b24 100644 --- a/system/helpers/url_helper.php +++ b/system/helpers/url_helper.php @@ -52,14 +52,14 @@ if ( ! function_exists('site_url')) */ function site_url($uri = '', $protocol = NULL) { - $site_url = get_instance()->config->site_url($uri); + $uri = get_instance()->config->site_url($uri); if (isset($protocol)) { - $site_url = $protocol.substr($site_url, strpos($site_url, '://')); + return $protocol.substr($uri, strpos($uri, '://')); } - return $site_url; + return $uri; } } @@ -80,14 +80,14 @@ if ( ! function_exists('base_url')) */ function base_url($uri = '', $protocol = NULL) { - $base_url = get_instance()->config->base_url($uri); + $uri = get_instance()->config->base_url($uri); if (isset($protocol)) { - $base_url = $protocol.substr($base_url, strpos($base_url, '://')); + return $protocol.substr($uri, strpos($uri, '://')); } - return $base_url; + return $uri; } } |