aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--application/front/controller/admin/ServerController.php4
-rw-r--r--application/helper/FileUtils.php2
-rw-r--r--tests/helper/FileUtilsTest.php1
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
5namespace Shaarli\Front\Controller\Admin; 5namespace Shaarli\Front\Controller\Admin;
6 6
7use Shaarli\ApplicationUtils; 7use Shaarli\Helper\ApplicationUtils;
8use Shaarli\FileUtils; 8use Shaarli\Helper\FileUtils;
9use Slim\Http\Request; 9use Slim\Http\Request;
10use Slim\Http\Response; 10use 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
5use Exception; 5use Exception;
6use Shaarli\Exceptions\IOException; 6use Shaarli\Exceptions\IOException;
7use Shaarli\TestCase;
7 8
8/** 9/**
9 * Class FileUtilsTest 10 * Class FileUtilsTest