Compare commits

..

No commits in common. "c57d418a52f75a6e22895c068b0c74deda548ec2" and "9398e9c6bea17d818334b15fb99e4b0c71b1ae68" have entirely different histories.

2 changed files with 3 additions and 4 deletions

View File

@ -64,6 +64,7 @@ final class MainController extends AbstractController
foreach ($finder as $file) { foreach ($finder as $file) {
$current = &$tree; $current = &$tree;
// Dunno why it is undefined, it works
foreach (explode('/', $file->getRelativePath()) as $part) { foreach (explode('/', $file->getRelativePath()) as $part) {
if ($part === '') break; if ($part === '') break;
@ -73,9 +74,7 @@ final class MainController extends AbstractController
$current = &$current[$part]; $current = &$current[$part];
} }
if (!isset($current[$part])) { $current[$file->getFilenameWithoutExtension()] = [];
$current[$file->getFilenameWithoutExtension()] = [];
}
} }
return $this->render('main/index.html.twig', [ return $this->render('main/index.html.twig', [

View File

@ -11,7 +11,7 @@
}) }}"> }) }}">
{{ name }} {{ name }}
</a> </a>
{{ _self.render_tree(subtree, prefix ~ name ~ '/') }} {{ _self.render_tree(subtree, name ~ '/') }}
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>