summaryrefslogtreecommitdiffstats
path: root/system/helpers/string_helper.php
diff options
context:
space:
mode:
authorJonathon Hill <jhill@brandmovers.com>2012-11-12 14:51:41 +0100
committerJonathon Hill <jhill@brandmovers.com>2012-11-12 14:51:41 +0100
commit3978fc33d82dd7f778d1adbf30744f4dfac41c25 (patch)
treef32be1ae610f0cfeff65c35abecd14e8ea5cadc6 /system/helpers/string_helper.php
parent275cf274860c6ed181d50b398efd3a21d7ba9135 (diff)
parenta9ab46d7a031bda304eb9b6658ffaf693b8d9bcb (diff)
Merge remote-tracking branch 'upstream/develop' into develop
Conflicts: user_guide_src/source/changelog.rst Signed-off-by: Jonathon Hill <jhill@brandmovers.com>
Diffstat (limited to 'system/helpers/string_helper.php')
-rw-r--r--system/helpers/string_helper.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/system/helpers/string_helper.php b/system/helpers/string_helper.php
index c5c493452..9fc24559a 100644
--- a/system/helpers/string_helper.php
+++ b/system/helpers/string_helper.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php
/**
* CodeIgniter
*
@@ -24,6 +24,7 @@
* @since Version 1.0
* @filesource
*/
+defined('BASEPATH') OR exit('No direct script access allowed');
/**
* CodeIgniter String Helpers
@@ -50,6 +51,9 @@ if ( ! function_exists('trim_slashes'))
*
* this/that/theother
*
+ * @todo Remove in version 3.1+.
+ * @deprecated 3.0.0 This is just an alias for PHP's native trim()
+ *
* @param string
* @return string
*/
@@ -214,10 +218,10 @@ if ( ! function_exists('random_string'))
break;
}
return substr(str_shuffle(str_repeat($pool, ceil($len / strlen($pool)))), 0, $len);
- case 'unique':
+ case 'unique': // todo: remove in 3.1+
case 'md5':
return md5(uniqid(mt_rand()));
- case 'encrypt':
+ case 'encrypt': // todo: remove in 3.1+
case 'sha1':
return sha1(uniqid(mt_rand(), TRUE));
}