]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-15351: fix higher level of path information for local repository - begin testing.
authorscyrma <scyrma>
Thu, 28 Aug 2008 07:42:37 +0000 (07:42 +0000)
committerscyrma <scyrma>
Thu, 28 Aug 2008 07:42:37 +0000 (07:42 +0000)
repository/local/repository.class.php

index b1cbbcd00c83154862c41578f2004342cc7d7459..b73ddcb14e95b05139048c02567e5bd5e2795aab 100755 (executable)
@@ -49,12 +49,8 @@ class repository_local extends repository {
         $filearea = null;
 
         if ($fileinfo = $browser->get_file_info($this->context, $filearea, $itemid, $path, $filename)) {
-            $level = $fileinfo->get_parent();
             $path = array();
-            while ($level) {
-                $path[] = $level->get_visible_name();
-                $level = $level->get_parent();
-            }
+            $path[] = $fileinfo->get_visible_name();
             $ret['path'] = array_reverse($path);
             $ret['list'] = $this->build_tree($fileinfo, $search);
         } else {