diff options
-rw-r--r-- | application/front/controller/admin/ServerController.php | 4 | ||||
-rw-r--r-- | application/helper/FileUtils.php | 2 | ||||
-rw-r--r-- | 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); | |||
4 | 4 | ||
5 | namespace Shaarli\Front\Controller\Admin; | 5 | namespace Shaarli\Front\Controller\Admin; |
6 | 6 | ||
7 | use Shaarli\ApplicationUtils; | 7 | use Shaarli\Helper\ApplicationUtils; |
8 | use Shaarli\FileUtils; | 8 | use Shaarli\Helper\FileUtils; |
9 | use Slim\Http\Request; | 9 | use Slim\Http\Request; |
10 | use Slim\Http\Response; | 10 | use Slim\Http\Response; |
11 | 11 | ||
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 | |||
133 | */ | 133 | */ |
134 | public static function isPathInShaarliFolder(string $path): bool | 134 | public static function isPathInShaarliFolder(string $path): bool |
135 | { | 135 | { |
136 | $rootDirectory = dirname(dirname(__FILE__)); | 136 | $rootDirectory = dirname(dirname(dirname(__FILE__))); |
137 | 137 | ||
138 | return strpos(realpath($path), $rootDirectory) !== false; | 138 | return strpos(realpath($path), $rootDirectory) !== false; |
139 | } | 139 | } |
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; | |||
4 | 4 | ||
5 | use Exception; | 5 | use Exception; |
6 | use Shaarli\Exceptions\IOException; | 6 | use Shaarli\Exceptions\IOException; |
7 | use Shaarli\TestCase; | ||
7 | 8 | ||
8 | /** | 9 | /** |
9 | * Class FileUtilsTest | 10 | * Class FileUtilsTest |