Update to CodeIgniter 2.1.0
This commit is contained in:
30
system/core/Common.php
Executable file → Normal file
30
system/core/Common.php
Executable file → Normal file
@@ -132,9 +132,9 @@ if ( ! function_exists('load_class'))
|
||||
|
||||
$name = FALSE;
|
||||
|
||||
// Look for the class first in the native system/libraries folder
|
||||
// thenin the local application/libraries folder
|
||||
foreach (array(BASEPATH, APPPATH) as $path)
|
||||
// Look for the class first in the local application/libraries folder
|
||||
// then in the native system/libraries folder
|
||||
foreach (array(APPPATH, BASEPATH) as $path)
|
||||
{
|
||||
if (file_exists($path.$directory.'/'.$class.'.php'))
|
||||
{
|
||||
@@ -536,5 +536,29 @@ if ( ! function_exists('remove_invisible_characters'))
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Returns HTML escaped variable
|
||||
*
|
||||
* @access public
|
||||
* @param mixed
|
||||
* @return mixed
|
||||
*/
|
||||
if ( ! function_exists('html_escape'))
|
||||
{
|
||||
function html_escape($var)
|
||||
{
|
||||
if (is_array($var))
|
||||
{
|
||||
return array_map('html_escape', $var);
|
||||
}
|
||||
else
|
||||
{
|
||||
return htmlspecialchars($var, ENT_QUOTES, config_item('charset'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* End of file Common.php */
|
||||
/* Location: ./system/core/Common.php */
|
||||
Reference in New Issue
Block a user