keep old behavour if no contextual readme

This commit is contained in:
Guillaume Zitta
2013-07-29 18:09:44 +02:00
parent 1cae7513d4
commit 925df1e4c0

View File

@@ -167,7 +167,7 @@ class Repository
$branch = $repository->getHead(); $branch = $repository->getHead();
} }
if ($path != "") $path = "$path/"; if ($path != "") $path = "$path/";
$files = $repository->getTree($path != "" ? "$branch:$path" : $branch)->output(); $files = $repository->getTree($path != "" ? "$branch:$path" : $branch)->output();
@@ -179,7 +179,8 @@ class Repository
); );
} }
} }
// No contextual readme, try to catch the main one if we are in deeper context
if ($path != "") return $this->getReadme($repository, $branch, "");
return array(); return array();
} }