From: dongsheng Date: Fri, 17 Apr 2009 08:00:59 +0000 (+0000) Subject: "MDL-18886, use array index to get files tree children" X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=b81ebefd70a6ac839ff4259a8b0c8061c7cac16e;p=moodle.git "MDL-18886, use array index to get files tree children" --- diff --git a/repository/lib.php b/repository/lib.php index fb42937db4..2181ed98bf 100644 --- a/repository/lib.php +++ b/repository/lib.php @@ -829,7 +829,7 @@ abstract class repository { } /** - * Return the user arborescence in a format to be returned by the function get_listing + * Return the user files tree in a format to be returned by the function get_listing * @global $CFG * @param $search * @return @@ -1486,10 +1486,11 @@ abstract class repository { $accepted_types = optional_param('accepted_types', '', PARAM_RAW); $ft = new file_type_to_ext; $ext = $ft->get_file_ext($this->supported_filetypes()); - if (isset($value->children)) { + if (isset($value['children'])) { $pass = true; - if (!empty($value->children)) { - $value->children = array_filter($value->children, array($this, 'filter')); + if (!empty($value['children'])) { + echo_fb($value); + $value['children'] = array_filter($value['children'], array($this, 'filter')); } } else { if ($accepted_types == '*' or empty($accepted_types)