summaryrefslogtreecommitdiffstats
path: root/system/helpers
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2008-12-09 20:41:25 +0100
committerDerek Jones <derek.jones@ellislab.com>2008-12-09 20:41:25 +0100
commit40a2fc8ab781130761237a29455718d24cb23821 (patch)
tree2e0a483cad3123f0a9d19ed31d211afc3290773b /system/helpers
parent541ddbd6f3c0231f0e7fc0a18d9d54670a808958 (diff)
added $lowercase parameter to url_title() to allow forced lowercase
Diffstat (limited to 'system/helpers')
-rw-r--r--system/helpers/url_helper.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php
index fd13dc2d4..9b449ea9e 100644
--- a/system/helpers/url_helper.php
+++ b/system/helpers/url_helper.php
@@ -471,7 +471,7 @@ if ( ! function_exists('prep_url'))
*/
if ( ! function_exists('url_title'))
{
- function url_title($str, $separator = 'dash')
+ function url_title($str, $separator = 'dash', $lowercase = FALSE)
{
if ($separator == 'dash')
{
@@ -501,6 +501,11 @@ if ( ! function_exists('url_title'))
$str = preg_replace("#".$key."#i", $val, $str);
}
+ if ($lowercase === TRUE)
+ {
+ $str = strtolower($str);
+ }
+
return trim(stripslashes($str));
}
}