diff options
author | Andrey Andreev <narf@devilix.net> | 2013-10-26 13:15:02 +0200 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2013-10-26 13:15:02 +0200 |
commit | 28a3692b2b43d9ffd0eb7668fb64c3347c676722 (patch) | |
tree | 5a25efde552a13d2df616fa8fe573125c68e57c6 /system/helpers/url_helper.php | |
parent | a587a939ce0b8e7d1dfe0830ac83d881e151d6e0 (diff) | |
parent | 8c0e56f5349cb52e993eb7132a87151e838e95b0 (diff) |
Merge pull request #2699 from vlakoff/url-functions
Implement $protocol parameter in Config base_url() and site_url() methods
Diffstat (limited to 'system/helpers/url_helper.php')
-rw-r--r-- | system/helpers/url_helper.php | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php index fbb4a1b24..b0f436840 100644 --- a/system/helpers/url_helper.php +++ b/system/helpers/url_helper.php @@ -52,14 +52,7 @@ if ( ! function_exists('site_url')) */ function site_url($uri = '', $protocol = NULL) { - $uri = get_instance()->config->site_url($uri); - - if (isset($protocol)) - { - return $protocol.substr($uri, strpos($uri, '://')); - } - - return $uri; + return get_instance()->config->site_url($uri, $protocol); } } @@ -80,14 +73,7 @@ if ( ! function_exists('base_url')) */ function base_url($uri = '', $protocol = NULL) { - $uri = get_instance()->config->base_url($uri); - - if (isset($protocol)) - { - return $protocol.substr($uri, strpos($uri, '://')); - } - - return $uri; + return get_instance()->config->base_url($uri, $protocol); } } |