From 5f86bf79b1cee2f5ee5d1bc76609d4071a941c65 Mon Sep 17 00:00:00 2001 From: Chris Kankiewicz Date: Wed, 5 Feb 2020 10:16:33 -0700 Subject: [PATCH] Removed DirectoryController::isRoot() method --- app/src/Controllers/DirectoryController.php | 13 ------------- app/views/index.twig | 2 +- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/app/src/Controllers/DirectoryController.php b/app/src/Controllers/DirectoryController.php index 264e498..272400c 100644 --- a/app/src/Controllers/DirectoryController.php +++ b/app/src/Controllers/DirectoryController.php @@ -64,24 +64,11 @@ class DirectoryController sprintf('/(?:.*)%s(?:.*)/i', preg_quote($search, '/')) ) : $files->depth(0), 'path' => $path, - 'is_root' => $this->isRoot($path), 'readme' => $this->readme($path), 'search' => $search, ]); } - /** - * Determine if a provided path is the root path. - * - * @param string $path - * - * @return bool - */ - protected function isRoot(string $path): bool - { - return realpath($path) === realpath($this->container->get('base_path')); - } - /** * Return the README file for a given path. * diff --git a/app/views/index.twig b/app/views/index.twig index ffa949a..e8d7e95 100644 --- a/app/views/index.twig +++ b/app/views/index.twig @@ -21,7 +21,7 @@