From 3bd3e067d68720a978ad56e86a0ae584f1bef183 Mon Sep 17 00:00:00 2001 From: skodak Date: Sat, 4 Jul 2009 19:03:44 +0000 Subject: [PATCH] MDL-16597 at least basic support for displaying of subdirectory content and general cleanup --- lib/form/filemanager.php | 54 +++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 29 deletions(-) diff --git a/lib/form/filemanager.php b/lib/form/filemanager.php index a326973c15..4bca664424 100644 --- a/lib/form/filemanager.php +++ b/lib/form/filemanager.php @@ -96,36 +96,32 @@ class MoodleQuickForm_filemanager extends HTML_QuickForm_element { function _get_draftfiles($draftid, $suffix) { global $USER, $OUTPUT, $CFG; - $html = ''; - if (!$context = get_context_instance(CONTEXT_USER, $USER->id)) { - } - $contextid = $context->id; - $filearea = 'user_draft'; - - $browser = get_file_browser(); - $fs = get_file_storage(); - $filepath = '/'; - if (!$directory = $fs->get_file($context->id, 'user_draft', $draftid, $filepath, '.')) { - $directory = new virtual_root_file($context->id, 'user_draft', $draftid); - $filepath = $directory->get_filepath(); - } - $files = $fs->get_directory_files($context->id, 'user_draft', $draftid, $directory->get_filepath()); - $parent = $directory->get_parent_directory(); - $html .= '