From da39cf2892b2db20ecb62114f2ac3fe51c98487a Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 2 May 2024 22:54:39 +0000 Subject: [PATCH] Went through todos --- Admin/Installer.php | 36 +++++++++++++++++++++++++---- Controller/BackendController.php | 14 ++++++++--- Theme/Backend/search-result.tpl.php | 4 +++- 3 files changed, 46 insertions(+), 8 deletions(-) diff --git a/Admin/Installer.php b/Admin/Installer.php index 3bc9fb4..8e6d6b0 100755 --- a/Admin/Installer.php +++ b/Admin/Installer.php @@ -40,6 +40,30 @@ final class Installer extends InstallerAbstract */ public const PATH = __DIR__; + /** + * Commands. + * + * Include consideres the state of the file during script execution. + * This means setting it to empty has no effect if it was not empty before. + * There are also other merging bugs that can happen. + * + * @var array + * @since 1.0.0 + */ + private static array $commands = []; + + /** + * Is first command load? + * + * Include consideres the state of the file during script execution. + * This means setting it to empty has no effect if it was not empty before. + * There are also other merging bugs that can happen. + * + * @var bool + * @since 1.0.0 + */ + private static bool $isFirstLoad = true; + /** * {@inheritdoc} */ @@ -58,6 +82,7 @@ final class Installer extends InstallerAbstract } \file_put_contents(__DIR__ . '/SearchCommands.php', 'data = []; - $temp = empty($request->getDataString('search')) ? [] : $this->routeSearch($internalRequest, $internalResponse, $data); - $view->data = empty($temp) ? [] : \reset($temp); + $temp = empty($request->getDataString('search')) + ? [] + : $this->routeSearch($internalRequest, $internalResponse, $data); + + $response->header = $internalResponse->header; + + $responseData = \reset($temp); + $view->data = empty($temp) || !\is_array($responseData) ? [] : $responseData; return $view; } diff --git a/Theme/Backend/search-result.tpl.php b/Theme/Backend/search-result.tpl.php index 4204ca8..cd1c7ee 100644 --- a/Theme/Backend/search-result.tpl.php +++ b/Theme/Backend/search-result.tpl.php @@ -76,13 +76,14 @@ foreach ($this->data as $controller) : ?>
-
+ +
@@ -92,6 +93,7 @@ foreach ($this->data as $controller) :
+