MDL-8029 obsoleted html_entity_decode() and file_get_contents() emulation removed from moodlelib

This commit is contained in:
skodak 2006-12-30 21:18:15 +00:00
parent 2098f6ddbb
commit 0e5215db91

View File

@ -6332,22 +6332,6 @@ if(!function_exists('file_put_contents')) {
}
}
/**
* html_entity_decode is only supported by php 4.3.0 and higher
* so if it is not predefined, define it here
*
* @param string $string ?
* @return string
* @todo Finish documenting this function
*/
if(!function_exists('html_entity_decode')) {
function html_entity_decode($string) {
$trans_tbl = get_html_translation_table(HTML_ENTITIES);
$trans_tbl = array_flip($trans_tbl);
return strtr($string, $trans_tbl);
}
}
/**
* The clone keyword is only supported from PHP 5 onwards.
* The behaviour of $obj2 = $obj1 differs fundamentally
@ -6560,13 +6544,6 @@ function get_performance_info() {
return $info;
}
if (!function_exists('file_get_contents')) {
function file_get_contents($file) {
$file = file($file);
return $file ? implode('', $file) : false;
}
}
function remove_dir($dir, $content_only=false) {
// if content_only=true then delete all but