From 4433f424d7a0dd7e5863ddd5393c13be377ed6ce Mon Sep 17 00:00:00 2001 From: Derek Allard Date: Fri, 23 Jul 2010 08:47:34 -0400 Subject: adding sanitize_filename() into the security helper --- system/helpers/security_helper.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'system') diff --git a/system/helpers/security_helper.php b/system/helpers/security_helper.php index 654cfd100..63f0e9cdb 100644 --- a/system/helpers/security_helper.php +++ b/system/helpers/security_helper.php @@ -44,6 +44,24 @@ if ( ! function_exists('xss_clean')) } } +// ------------------------------------------------------------------------ + +/** + * Sanitize Filename + * + * @access public + * @param string + * @return string + */ +if ( ! function_exists('sanitize_filename')) +{ + function sanitize_filename($filename) + { + $CI =& get_instance(); + return $CI->security->sanitize_filename($filename); + } +} + // -------------------------------------------------------------------- /** -- cgit v1.2.3-24-g4f1b