From 0c3314ff16a847e5736b75f121a5178e1faffc0f Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Sat, 18 Sep 2010 10:24:35 +0000 Subject: [PATCH] fixed phpdocs and fatal error in delete method --- lib/filebrowser/file_info_stored.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/filebrowser/file_info_stored.php b/lib/filebrowser/file_info_stored.php index 708ea11612b..6720316c8dc 100644 --- a/lib/filebrowser/file_info_stored.php +++ b/lib/filebrowser/file_info_stored.php @@ -49,13 +49,13 @@ class file_info_stored extends file_info { * Constructor * * @param file_browser $browser - * @param object $context - * @param stored_file $storedfile + * @param stdClass $context + * @param stored_file|virtual_root_file $storedfile * @param string $urlbase the serving script - usually the $CFG->wwwroot/.'pluginfile.php' * @param string $topvisiblename the human readable name of this area - * @param string $itemidused false if itemid always 0 and not included in URL - * @param string $readaccess allow file reading - * @param string $writeaccess allow file write, delete + * @param int|bool $itemidused false if itemid always 0 and not included in URL + * @param bool $readaccess allow file reading + * @param bool $writeaccess allow file write, delete * @param string $areaonly do not show links to parent context/area */ public function __construct(file_browser $browser, $context, $storedfile, $urlbase, $topvisiblename, $itemidused, $readaccess, $writeaccess, $areaonly) { @@ -471,7 +471,7 @@ class file_info_stored extends file_info { if ($this->is_directory()) { $filepath = $this->lf->get_filepath(); $fs = get_file_storage(); - $storedfiles = $fs->get_area_files($this->context->id, $file->get_component(), $this->lf->get_filearea(), $this->lf->get_itemid(), ""); + $storedfiles = $fs->get_area_files($this->context->id, $this->get_component(), $this->lf->get_filearea(), $this->lf->get_itemid(), ""); foreach ($storedfiles as $file) { if (strpos($file->get_filepath(), $filepath) === 0) { $file->delete();