summaryrefslogtreecommitdiffstats
path: root/system/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'system/helpers')
-rw-r--r--system/helpers/string_helper.php4
-rw-r--r--system/helpers/url_helper.php15
2 files changed, 3 insertions, 16 deletions
diff --git a/system/helpers/string_helper.php b/system/helpers/string_helper.php
index 3a05525db..5b359f730 100644
--- a/system/helpers/string_helper.php
+++ b/system/helpers/string_helper.php
@@ -170,7 +170,7 @@ if ( ! function_exists('random_string'))
/**
* Create a "Random" String
*
- * @param string type of random string. basic, alpha, alnum, numeric, nozero, unique, md5, encrypt and sha1
+ * @param string type of random string. basic, alpha, alnum, numeric, nozero, md5 and sha1
* @param int number of characters
* @return string
*/
@@ -200,10 +200,8 @@ if ( ! function_exists('random_string'))
break;
}
return substr(str_shuffle(str_repeat($pool, ceil($len / strlen($pool)))), 0, $len);
- case 'unique': // todo: remove in 3.1+
case 'md5':
return md5(uniqid(mt_rand()));
- case 'encrypt': // todo: remove in 3.1+
case 'sha1':
return sha1(uniqid(mt_rand(), TRUE));
}
diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php
index 4c060a203..17601c40c 100644
--- a/system/helpers/url_helper.php
+++ b/system/helpers/url_helper.php
@@ -470,31 +470,20 @@ if ( ! function_exists('url_title'))
* human-friendly URL string with a "separator" string
* as the word separator.
*
- * @todo Remove old 'dash' and 'underscore' usage in 3.1+.
* @param string $str Input string
- * @param string $separator Word separator
- * (usually '-' or '_')
+ * @param string $separator Word separator (usually '-' or '_')
* @param bool $lowercase Whether to transform the output string to lowercase
* @return string
*/
function url_title($str, $separator = '-', $lowercase = FALSE)
{
- if ($separator === 'dash')
- {
- $separator = '-';
- }
- elseif ($separator === 'underscore')
- {
- $separator = '_';
- }
-
$q_separator = preg_quote($separator, '#');
$trans = array(
'&.+?;' => '',
'[^\w\d _-]' => '',
'\s+' => $separator,
- '('.$q_separator.')+' => $separator
+ '('.$q_separator.')+' => $separator,
);
$str = strip_tags($str);