summaryrefslogtreecommitdiffstats
path: root/system/helpers
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2011-04-06 23:59:37 +0200
committerPhil Sturgeon <email@philsturgeon.co.uk>2011-04-06 23:59:37 +0200
commiteda33d5ece128fcc11f6b46df38b3bfd76eb74ad (patch)
tree0b5e72e236bde4ebd59c246e3cfd458baccb529e /system/helpers
parent05fa61144667c85b0463f7e8baa6af00aa195dc6 (diff)
parenta6a7ef10a755a718008fbee4b01b80a682b89c39 (diff)
Made Environment Support optional. Comment out or delete the constant to stop environment checks.
Diffstat (limited to 'system/helpers')
-rw-r--r--system/helpers/security_helper.php34
-rw-r--r--system/helpers/typography_helper.php5
2 files changed, 3 insertions, 36 deletions
diff --git a/system/helpers/security_helper.php b/system/helpers/security_helper.php
index 61ebf46f9..678dac821 100644
--- a/system/helpers/security_helper.php
+++ b/system/helpers/security_helper.php
@@ -67,22 +67,6 @@ if ( ! function_exists('sanitize_filename'))
/**
* Hash encode a string
*
- * This is simply an alias for do_hash()
- * dohash() is now deprecated
- */
-if ( ! function_exists('dohash'))
-{
- function dohash($str, $type = 'sha1')
- {
- return do_hash($str, $type);
- }
-}
-
-// --------------------------------------------------------------------
-
-/**
- * Hash encode a string
- *
* @access public
* @param string
* @return string
@@ -93,23 +77,7 @@ if ( ! function_exists('do_hash'))
{
if ($type == 'sha1')
{
- if ( ! function_exists('sha1'))
- {
- if ( ! function_exists('mhash'))
- {
- require_once(BASEPATH.'libraries/Sha1'.EXT);
- $SH = new CI_SHA;
- return $SH->generate($str);
- }
- else
- {
- return bin2hex(mhash(MHASH_SHA1, $str));
- }
- }
- else
- {
- return sha1($str);
- }
+ return sha1($str);
}
else
{
diff --git a/system/helpers/typography_helper.php b/system/helpers/typography_helper.php
index 302bf45c5..19b4eec03 100644
--- a/system/helpers/typography_helper.php
+++ b/system/helpers/typography_helper.php
@@ -84,9 +84,8 @@ if ( ! function_exists('entity_decode'))
{
function entity_decode($str, $charset='UTF-8')
{
- $CI =& get_instance();
- $CI->load->library('security');
- return $CI->security->entity_decode($str, $charset);
+ global $SEC;
+ return $SEC->entity_decode($str, $charset);
}
}