diff --git a/src/Controller/ToolsController.php b/src/Controller/ToolsController.php
index 8f49d6f7..78e149e3 100644
--- a/src/Controller/ToolsController.php
+++ b/src/Controller/ToolsController.php
@@ -22,16 +22,17 @@ declare(strict_types=1);
*/
namespace App\Controller;
-use Symfony\Component\Runtime\SymfonyRuntime;
use App\Services\Attachments\AttachmentSubmitHandler;
use App\Services\Attachments\AttachmentURLGenerator;
use App\Services\Attachments\BuiltinAttachmentsFinder;
+use App\Services\Doctrine\DBInfoHelper;
+use App\Services\Doctrine\NatsortDebugHelper;
use App\Services\Misc\GitVersionInfo;
-use App\Services\Misc\DBInfoHelper;
use App\Services\System\UpdateAvailableManager;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
+use Symfony\Component\Runtime\SymfonyRuntime;
#[Route(path: '/tools')]
class ToolsController extends AbstractController
@@ -45,7 +46,7 @@ class ToolsController extends AbstractController
}
#[Route(path: '/server_infos', name: 'tools_server_infos')]
- public function systemInfos(GitVersionInfo $versionInfo, DBInfoHelper $DBInfoHelper,
+ public function systemInfos(GitVersionInfo $versionInfo, DBInfoHelper $DBInfoHelper, NatsortDebugHelper $natsortDebugHelper,
AttachmentSubmitHandler $attachmentSubmitHandler, UpdateAvailableManager $updateAvailableManager): Response
{
$this->denyAccessUnlessGranted('@system.server_infos');
@@ -93,6 +94,8 @@ class ToolsController extends AbstractController
'db_size' => $DBInfoHelper->getDatabaseSize(),
'db_name' => $DBInfoHelper->getDatabaseName() ?? 'Unknown',
'db_user' => $DBInfoHelper->getDatabaseUsername() ?? 'Unknown',
+ 'db_natsort_method' => $natsortDebugHelper->getNaturalSortMethod(),
+ 'db_natsort_slow_allowed' => $natsortDebugHelper->isSlowNaturalSortAllowed(),
//New version section
'new_version_available' => $updateAvailableManager->isUpdateAvailable(),
diff --git a/src/Doctrine/Functions/Natsort.php b/src/Doctrine/Functions/Natsort.php
index 56001039..bd05e0d6 100644
--- a/src/Doctrine/Functions/Natsort.php
+++ b/src/Doctrine/Functions/Natsort.php
@@ -55,6 +55,15 @@ class Natsort extends FunctionNode
self::$allowSlowNaturalSort = $allow;
}
+ /**
+ * Check if the slow natural sort is allowed
+ * @return bool
+ */
+ public static function isSlowNaturalSortAllowed(): bool
+ {
+ return self::$allowSlowNaturalSort;
+ }
+
/**
* Check if the MariaDB version which is connected to supports the natural sort (meaning it has a version of 10.7.0 or higher)
* The result is cached in memory.
diff --git a/src/Services/Misc/DBInfoHelper.php b/src/Services/Doctrine/DBInfoHelper.php
similarity index 84%
rename from src/Services/Misc/DBInfoHelper.php
rename to src/Services/Doctrine/DBInfoHelper.php
index 620da702..160e2d89 100644
--- a/src/Services/Misc/DBInfoHelper.php
+++ b/src/Services/Doctrine/DBInfoHelper.php
@@ -1,4 +1,22 @@
.
+ */
declare(strict_types=1);
@@ -20,10 +38,10 @@ declare(strict_types=1);
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see