From 54afb1d6f65f727b20b66582bb63a42c421eea4d Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Tue, 27 Oct 2020 19:55:29 +0100 Subject: [PATCH] Fix rebase issue --- application/front/controller/admin/ServerController.php | 4 ++-- application/helper/FileUtils.php | 2 +- tests/helper/FileUtilsTest.php | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/application/front/controller/admin/ServerController.php b/application/front/controller/admin/ServerController.php index 85654a43..bfc99422 100644 --- a/application/front/controller/admin/ServerController.php +++ b/application/front/controller/admin/ServerController.php @@ -4,8 +4,8 @@ declare(strict_types=1); namespace Shaarli\Front\Controller\Admin; -use Shaarli\ApplicationUtils; -use Shaarli\FileUtils; +use Shaarli\Helper\ApplicationUtils; +use Shaarli\Helper\FileUtils; use Slim\Http\Request; use Slim\Http\Response; diff --git a/application/helper/FileUtils.php b/application/helper/FileUtils.php index 2d50d850..2eac0793 100644 --- a/application/helper/FileUtils.php +++ b/application/helper/FileUtils.php @@ -133,7 +133,7 @@ class FileUtils */ public static function isPathInShaarliFolder(string $path): bool { - $rootDirectory = dirname(dirname(__FILE__)); + $rootDirectory = dirname(dirname(dirname(__FILE__))); return strpos(realpath($path), $rootDirectory) !== false; } diff --git a/tests/helper/FileUtilsTest.php b/tests/helper/FileUtilsTest.php index 948e46d1..8035f79c 100644 --- a/tests/helper/FileUtilsTest.php +++ b/tests/helper/FileUtilsTest.php @@ -4,6 +4,7 @@ namespace Shaarli\Helper; use Exception; use Shaarli\Exceptions\IOException; +use Shaarli\TestCase; /** * Class FileUtilsTest -- 2.41.0