summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2013-07-18 13:15:57 +0200
committerAndrey Andreev <narf@devilix.net>2013-07-18 13:15:57 +0200
commit1f061c24ef6788ccfea4182e43f9d3076714940d (patch)
tree4afb9bc0ca24c34cb91441396a6e22061220cf75 /system
parent56c8ca6e3d292030283ee23745d495a146c168f5 (diff)
Micro-optimization on base_url() & site_url()
Diffstat (limited to 'system')
-rw-r--r--system/helpers/url_helper.php12
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;
}
}