MDL-78169 core: Immediate deprecation of htmllize_file_tree
This should have been done back in 2010 as part of MDL-22950. It has not been called in that time, and is entirely untested and untestable.
This commit is contained in:
+3
-30
@@ -2732,26 +2732,10 @@ class core_renderer extends renderer_base {
|
||||
}
|
||||
|
||||
/**
|
||||
* Internal implementation of file tree viewer items rendering.
|
||||
*
|
||||
* @param array $dir
|
||||
* @return string
|
||||
* @deprecated since Moodle 4.3
|
||||
*/
|
||||
public function htmllize_file_tree($dir) {
|
||||
if (empty($dir['subdirs']) and empty($dir['files'])) {
|
||||
return '';
|
||||
}
|
||||
$result = '<ul>';
|
||||
foreach ($dir['subdirs'] as $subdir) {
|
||||
$result .= '<li>'.s($subdir['dirname']).' '.$this->htmllize_file_tree($subdir).'</li>';
|
||||
}
|
||||
foreach ($dir['files'] as $file) {
|
||||
$filename = $file->get_filename();
|
||||
$result .= '<li><span>'.html_writer::link($file->fileurl, $filename).'</span></li>';
|
||||
}
|
||||
$result .= '</ul>';
|
||||
|
||||
return $result;
|
||||
public function htmllize_file_tree() {
|
||||
throw new coding_exception('This function is deprecated and no longer relevant.');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -5581,17 +5565,6 @@ class core_renderer_maintenance extends core_renderer {
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Does nothing. The maintenance renderer cannot produce and HTML file tree.
|
||||
*
|
||||
* @param array $dir
|
||||
* @return string
|
||||
*/
|
||||
public function htmllize_file_tree($dir) {
|
||||
return '';
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Overridden confirm message for upgrades.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user