From d09c51afac9df77a52380dc2ac6581a104faa2ff Mon Sep 17 00:00:00 2001 From: "anaxamaxan@blackdog.local" Date: Wed, 2 Feb 2011 23:00:16 -0800 Subject: Made config->base_url() accept parameters. config->base_url($uri). Updated base_url() in url_helper accordingly. --- system/helpers/url_helper.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'system/helpers/url_helper.php') diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php index d0516cee6..9f4b85248 100644 --- a/system/helpers/url_helper.php +++ b/system/helpers/url_helper.php @@ -50,18 +50,21 @@ if ( ! function_exists('site_url')) /** * Base URL - * - * Returns the "base_url" item from your config file + * + * Create a local URL based on your basepath. + * Segments can be passed in as a string or an array, same as site_url + * or a URL to a file can be passed in, e.g. to an image file. * * @access public + * @param string * @return string */ if ( ! function_exists('base_url')) { - function base_url() + function base_url($uri = '') { $CI =& get_instance(); - return $CI->config->slash_item('base_url'); + return $CI->config->base_url($uri); } } -- cgit v1.2.3-24-g4f1b From 4b9c62980599228f070b401c7673dce8085b0c61 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Fri, 1 Jul 2011 17:40:48 -0500 Subject: backed out 648b42a75739, which was a NON-trivial whitespace commit. It broke the Typography class's string replacements, for instance --- system/helpers/url_helper.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'system/helpers/url_helper.php') diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php index 8e93744fb..d0516cee6 100644 --- a/system/helpers/url_helper.php +++ b/system/helpers/url_helper.php @@ -1,4 +1,4 @@ - $val) { - $x[] = ' '.$key.'="'; + $x[] = ' '.$key.'="'; for ($i = 0; $i < strlen($val); $i++) { $x[] = "|".ord(substr($val, $i, 1)); @@ -363,7 +363,7 @@ if ( ! function_exists('safe_mailto')) * * Automatically links URL and Email addresses. * Note: There's a bit of extra code here to deal with - * URLs or emails that end in a period. We'll strip these + * URLs or emails that end in a period. We'll strip these * off and add them after the link. * * @access public -- cgit v1.2.3-24-g4f1b