From e9fbb8879ab3d1b82db541c0395b7e0a86f34534 Mon Sep 17 00:00:00 2001 From: tracer Date: Mon, 31 Jan 2022 19:17:01 +0100 Subject: [PATCH] removed injection of panel Signed-off-by: tracer --- src/Repository/DomainRepository.php | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/Repository/DomainRepository.php b/src/Repository/DomainRepository.php index b86022a..923c464 100644 --- a/src/Repository/DomainRepository.php +++ b/src/Repository/DomainRepository.php @@ -3,7 +3,6 @@ namespace App\Repository; use App\Controller\DatabaseConnection; -use App\Controller\PanelController; use App\Entity\Domain; use PDO; use PDOException; @@ -13,7 +12,7 @@ use PDOException; */ class DomainRepository { - public function __construct(private DatabaseConnection $databaseConnection, private PanelController $panelController) + public function __construct(private DatabaseConnection $databaseConnection) {} @@ -42,12 +41,10 @@ class DomainRepository } - - /** * @param int $id * - * @return false + * @return bool|\App\Entity\Domain */ public function findByID(int $id): bool|Domain { @@ -185,13 +182,6 @@ class DomainRepository $statement->bindParam(param: 'aaaa', var: $aaaa); $statement->execute(); - // recreate zonefile - if ($panel = $this->panelController->findByID(id: intval(value: $panelID))) { - $a = $panel['a']; - $aaaa = $panel['aaaa']; - } - exec(command: '/usr/sbin/rndc reload'); - return $statement->rowCount(); } catch (PDOException $e) { print($e->getMessage());