removed injection of panel

Signed-off-by: tracer <tracer@24unix.net>
This commit is contained in:
tracer 2022-01-31 19:17:01 +01:00
parent 087db2b2a9
commit e9fbb8879a
1 changed files with 2 additions and 12 deletions

View File

@ -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());